├── .gitignore ├── LICENSE ├── Makefile ├── Package.nuspec ├── README.md ├── VulkanSharp.sln ├── api-info └── reference.xml ├── code_of_conduct.md ├── docs ├── development │ └── ValidationLayers.md └── en │ ├── Vulkan │ ├── AccessFlags.xml │ ├── AllocationCallbacks.xml │ ├── ApplicationInfo.xml │ ├── AttachmentDescription.xml │ ├── AttachmentDescriptionFlags.xml │ ├── AttachmentLoadOp.xml │ ├── AttachmentReference.xml │ ├── AttachmentStoreOp.xml │ ├── BindSparseInfo.xml │ ├── BlendFactor.xml │ ├── BlendOp.xml │ ├── Bool32.xml │ ├── BorderColor.xml │ ├── Buffer.xml │ ├── BufferCopy.xml │ ├── BufferCreateFlags.xml │ ├── BufferCreateInfo.xml │ ├── BufferImageCopy.xml │ ├── BufferMemoryBarrier.xml │ ├── BufferUsageFlags.xml │ ├── BufferView.xml │ ├── BufferViewCreateInfo.xml │ ├── ClearAttachment.xml │ ├── ClearColorValue.xml │ ├── ClearDepthStencilValue.xml │ ├── ClearRect.xml │ ├── ClearValue.xml │ ├── ColorComponentFlags.xml │ ├── ColorSpaceKhr.xml │ ├── CommandBuffer.xml │ ├── CommandBufferAllocateInfo.xml │ ├── CommandBufferBeginInfo.xml │ ├── CommandBufferInheritanceInfo.xml │ ├── CommandBufferLevel.xml │ ├── CommandBufferResetFlags.xml │ ├── CommandBufferUsageFlags.xml │ ├── CommandPool.xml │ ├── CommandPoolCreateFlags.xml │ ├── CommandPoolCreateInfo.xml │ ├── CommandPoolResetFlags.xml │ ├── Commands.xml │ ├── CompareOp.xml │ ├── ComponentMapping.xml │ ├── ComponentSwizzle.xml │ ├── CompositeAlphaFlagsKhr.xml │ ├── ComputePipelineCreateInfo.xml │ ├── CopyDescriptorSet.xml │ ├── CullModeFlags.xml │ ├── DebugReportCallbackCreateInfoExt.xml │ ├── DebugReportCallbackExt.xml │ ├── DebugReportErrorExt.xml │ ├── DebugReportFlagsExt.xml │ ├── DebugReportObjectTypeExt.xml │ ├── DependencyFlags.xml │ ├── DescriptorBufferInfo.xml │ ├── DescriptorImageInfo.xml │ ├── DescriptorPool.xml │ ├── DescriptorPoolCreateFlags.xml │ ├── DescriptorPoolCreateInfo.xml │ ├── DescriptorPoolSize.xml │ ├── DescriptorSet.xml │ ├── DescriptorSetAllocateInfo.xml │ ├── DescriptorSetLayout.xml │ ├── DescriptorSetLayoutBinding.xml │ ├── DescriptorSetLayoutCreateInfo.xml │ ├── DescriptorType.xml │ ├── Device.xml │ ├── DeviceCreateInfo.xml │ ├── DeviceMemory.xml │ ├── DeviceQueueCreateInfo.xml │ ├── DeviceSize.xml │ ├── DispatchIndirectCommand.xml │ ├── DisplayKhr.xml │ ├── DisplayModeCreateInfoKhr.xml │ ├── DisplayModeKhr.xml │ ├── DisplayModeParametersKhr.xml │ ├── DisplayModePropertiesKhr.xml │ ├── DisplayPlaneAlphaFlagsKhr.xml │ ├── DisplayPlaneCapabilitiesKhr.xml │ ├── DisplayPlanePropertiesKhr.xml │ ├── DisplayPresentInfoKhr.xml │ ├── DisplayPropertiesKhr.xml │ ├── DisplaySurfaceCreateInfoKhr.xml │ ├── DrawIndexedIndirectCommand.xml │ ├── DrawIndirectCommand.xml │ ├── DynamicState.xml │ ├── Event.xml │ ├── EventCreateInfo.xml │ ├── ExtensionProperties.xml │ ├── Extent2D.xml │ ├── Extent3D.xml │ ├── Fence.xml │ ├── FenceCreateFlags.xml │ ├── FenceCreateInfo.xml │ ├── Filter.xml │ ├── Format.xml │ ├── FormatFeatureFlags.xml │ ├── FormatProperties.xml │ ├── Framebuffer.xml │ ├── FramebufferCreateInfo.xml │ ├── FrontFace.xml │ ├── GraphicsPipelineCreateInfo.xml │ ├── IMarshalling.xml │ ├── INonDispatchableHandleMarshalling.xml │ ├── Image.xml │ ├── ImageAspectFlags.xml │ ├── ImageBlit.xml │ ├── ImageCopy.xml │ ├── ImageCreateFlags.xml │ ├── ImageCreateInfo.xml │ ├── ImageFormatProperties.xml │ ├── ImageLayout.xml │ ├── ImageMemoryBarrier.xml │ ├── ImageResolve.xml │ ├── ImageSubresource.xml │ ├── ImageSubresourceLayers.xml │ ├── ImageSubresourceRange.xml │ ├── ImageTiling.xml │ ├── ImageType.xml │ ├── ImageUsageFlags.xml │ ├── ImageView.xml │ ├── ImageViewCreateInfo.xml │ ├── ImageViewType.xml │ ├── IndexType.xml │ ├── Instance+DebugReportCallback.xml │ ├── Instance.xml │ ├── InstanceCreateInfo.xml │ ├── InternalAllocationType.xml │ ├── LayerProperties.xml │ ├── LogicOp.xml │ ├── MappedMemoryRange.xml │ ├── MarshalledObject.xml │ ├── MemoryAllocateInfo.xml │ ├── MemoryBarrier.xml │ ├── MemoryHeap.xml │ ├── MemoryHeapFlags.xml │ ├── MemoryPropertyFlags.xml │ ├── MemoryRequirements.xml │ ├── MemoryType.xml │ ├── NativeMemoryDebug+ReportCallbackDelegate.xml │ ├── NativeMemoryDebug+StackTraceDelegate.xml │ ├── NativeMemoryDebug.xml │ ├── Offset2D.xml │ ├── Offset3D.xml │ ├── PhysicalDevice.xml │ ├── PhysicalDeviceFeatures.xml │ ├── PhysicalDeviceLimits.xml │ ├── PhysicalDeviceMemoryProperties.xml │ ├── PhysicalDeviceProperties.xml │ ├── PhysicalDeviceSparseProperties.xml │ ├── PhysicalDeviceType.xml │ ├── Pipeline.xml │ ├── PipelineBindPoint.xml │ ├── PipelineCache.xml │ ├── PipelineCacheCreateInfo.xml │ ├── PipelineCacheHeaderVersion.xml │ ├── PipelineColorBlendAttachmentState.xml │ ├── PipelineColorBlendStateCreateInfo.xml │ ├── PipelineCreateFlags.xml │ ├── PipelineDepthStencilStateCreateInfo.xml │ ├── PipelineDynamicStateCreateInfo.xml │ ├── PipelineInputAssemblyStateCreateInfo.xml │ ├── PipelineLayout.xml │ ├── PipelineLayoutCreateInfo.xml │ ├── PipelineMultisampleStateCreateInfo.xml │ ├── PipelineRasterizationStateCreateInfo.xml │ ├── PipelineShaderStageCreateInfo.xml │ ├── PipelineStageFlags.xml │ ├── PipelineTessellationStateCreateInfo.xml │ ├── PipelineVertexInputStateCreateInfo.xml │ ├── PipelineViewportStateCreateInfo.xml │ ├── PolygonMode.xml │ ├── PresentInfoKhr.xml │ ├── PresentModeKhr.xml │ ├── PrimitiveTopology.xml │ ├── PushConstantRange.xml │ ├── QueryControlFlags.xml │ ├── QueryPipelineStatisticFlags.xml │ ├── QueryPool.xml │ ├── QueryPoolCreateInfo.xml │ ├── QueryResultFlags.xml │ ├── QueryType.xml │ ├── Queue.xml │ ├── QueueFamilyProperties.xml │ ├── QueueFlags.xml │ ├── Rect2D.xml │ ├── Rect3D.xml │ ├── RenderPass.xml │ ├── RenderPassBeginInfo.xml │ ├── RenderPassCreateInfo.xml │ ├── Result.xml │ ├── ResultException.xml │ ├── SampleCountFlags.xml │ ├── Sampler.xml │ ├── SamplerAddressMode.xml │ ├── SamplerCreateInfo.xml │ ├── SamplerMipmapMode.xml │ ├── Semaphore.xml │ ├── SemaphoreCreateInfo.xml │ ├── ShaderModule.xml │ ├── ShaderModuleCreateInfo.xml │ ├── ShaderStageFlags.xml │ ├── SharingMode.xml │ ├── SparseBufferMemoryBindInfo.xml │ ├── SparseImageFormatFlags.xml │ ├── SparseImageFormatProperties.xml │ ├── SparseImageMemoryBind.xml │ ├── SparseImageMemoryBindInfo.xml │ ├── SparseImageMemoryRequirements.xml │ ├── SparseImageOpaqueMemoryBindInfo.xml │ ├── SparseMemoryBind.xml │ ├── SparseMemoryBindFlags.xml │ ├── SpecializationInfo.xml │ ├── SpecializationMapEntry.xml │ ├── StencilFaceFlags.xml │ ├── StencilOp.xml │ ├── StencilOpState.xml │ ├── StructureType.xml │ ├── SubmitInfo.xml │ ├── SubpassContents.xml │ ├── SubpassDependency.xml │ ├── SubpassDescription.xml │ ├── SubresourceLayout.xml │ ├── SurfaceCapabilitiesKhr.xml │ ├── SurfaceFormatKhr.xml │ ├── SurfaceKhr.xml │ ├── SurfaceTransformFlagsKhr.xml │ ├── SwapchainCreateInfoKhr.xml │ ├── SwapchainKhr.xml │ ├── SystemAllocationScope.xml │ ├── Version.xml │ ├── VertexInputAttributeDescription.xml │ ├── VertexInputBindingDescription.xml │ ├── VertexInputRate.xml │ ├── Viewport.xml │ └── WriteDescriptorSet.xml │ ├── index.xml │ └── ns-Vulkan.xml ├── lib └── .gitignore ├── netstandard └── Vulkan.csproj ├── samples ├── ClearView │ ├── ClearView.Android │ │ ├── Assets │ │ │ └── AboutAssets.txt │ │ ├── ClearView.Android.csproj │ │ ├── ClearView.Android.csproj.bak │ │ ├── MainActivity.cs │ │ ├── Properties │ │ │ ├── AndroidManifest.xml │ │ │ └── AssemblyInfo.cs │ │ └── Resources │ │ │ ├── AboutResources.txt │ │ │ ├── layout │ │ │ └── Main.axml │ │ │ ├── mipmap-hdpi │ │ │ └── Icon.png │ │ │ ├── mipmap-mdpi │ │ │ └── Icon.png │ │ │ ├── mipmap-xhdpi │ │ │ └── Icon.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── Icon.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── Icon.png │ │ │ └── values │ │ │ └── Strings.xml │ ├── ClearView.Common │ │ ├── ClearView.Common.csproj │ │ ├── ClearViewSample.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ └── ClearView.Windows │ │ ├── App.config │ │ ├── ClearView.Windows.csproj │ │ ├── Program.cs │ │ └── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.resx │ │ └── Settings.settings ├── Inspector │ ├── Inspector.Android │ │ ├── Assets │ │ │ └── AboutAssets.txt │ │ ├── Inspector.Android.csproj │ │ ├── InspectorView.cs │ │ ├── MainActivity.cs │ │ ├── Properties │ │ │ ├── AndroidManifest.xml │ │ │ └── AssemblyInfo.cs │ │ └── Resources │ │ │ ├── AboutResources.txt │ │ │ ├── layout │ │ │ └── Main.axml │ │ │ ├── mipmap-hdpi │ │ │ └── Icon.png │ │ │ ├── mipmap-mdpi │ │ │ └── Icon.png │ │ │ ├── mipmap-xhdpi │ │ │ └── Icon.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── Icon.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── Icon.png │ │ │ └── values │ │ │ └── Strings.xml │ ├── Inspector.Common │ │ ├── Inspector.Common.csproj │ │ ├── Inspector.cs │ │ └── Properties │ │ │ └── AssemblyInfo.cs │ └── Inspector.Windows │ │ ├── App.config │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Inspector.Windows.csproj │ │ ├── MainWindow.xaml │ │ ├── MainWindow.xaml.cs │ │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.resx │ │ └── Settings.settings │ │ └── packages.config ├── VulkanSample │ ├── VulkanSample.Android │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Resources │ │ │ └── AboutResources.txt │ │ ├── VulkanSample.Android.csproj │ │ └── VulkanSampleView.cs │ ├── VulkanSample.Common │ │ ├── IVulkanSample.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── VulkanSample.Common.csproj │ │ └── VulkanSampleBase.cs │ └── VulkanSample.Windows │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── VulkanSample.Windows.csproj │ │ └── VulkanSampleControl.cs └── XLogo │ ├── XLogo.Android │ ├── Assets │ │ └── AboutAssets.txt │ ├── MainActivity.cs │ ├── Properties │ │ ├── AndroidManifest.xml │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── AboutResources.txt │ │ ├── layout │ │ │ └── Main.axml │ │ ├── mipmap-hdpi │ │ │ └── Icon.png │ │ ├── mipmap-mdpi │ │ │ └── Icon.png │ │ ├── mipmap-xhdpi │ │ │ └── Icon.png │ │ ├── mipmap-xxhdpi │ │ │ └── Icon.png │ │ ├── mipmap-xxxhdpi │ │ │ └── Icon.png │ │ └── values │ │ │ └── Strings.xml │ ├── XLogo.Android.csproj │ └── XLogo.Android.csproj.bak │ ├── XLogo.Common │ ├── Logo.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Shaders │ │ ├── Shader.frag │ │ ├── Shader.vert │ │ ├── shader.frag.spv │ │ └── shader.vert.spv │ ├── XLogo.Common.csproj │ └── XLogoSample.cs │ └── XLogo.Windows │ ├── App.config │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.resx │ └── Settings.settings │ └── XLogo.Windows.csproj ├── src ├── Platforms │ ├── Android │ │ ├── Handles.cs │ │ ├── Interop │ │ │ ├── ImportedCommands.cs │ │ │ └── MarshalStructs.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Resources │ │ │ ├── AboutResources.txt │ │ │ └── values │ │ │ │ └── Strings.xml │ │ ├── Structs.cs │ │ ├── Vulkan.Android.csproj │ │ └── VulkanView.cs │ ├── Windows │ │ ├── Additions.cs │ │ ├── Handles.cs │ │ ├── Interop │ │ │ ├── ImportedCommands.cs │ │ │ └── MarshalStructs.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── Structs.cs │ │ ├── Vulkan.Windows.csproj │ │ └── VulkanControl.cs │ └── iOS │ │ ├── Handles.cs │ │ ├── Interop │ │ ├── ImportedCommands.cs │ │ └── MarshalStructs.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── Structs.cs │ │ └── Vulkan.iOS.csproj └── Vulkan │ ├── Additions.cs │ ├── Commands.cs │ ├── Enums.cs │ ├── Handles.cs │ ├── Helpers.cs │ ├── Interop │ ├── Helpers.cs │ ├── ImportedCommands.cs │ ├── MarshalStructs.cs │ └── MarshalUnions.cs │ ├── Properties │ ├── AssemblyInfo.cs │ └── AssemblyVisibility.cs │ ├── Structs.cs │ ├── Unions.cs │ ├── Vulkan.csproj │ └── Vulkan.dll.config ├── tests └── NativeMemory │ ├── Assets │ └── AboutAssets.txt │ ├── MainActivity.cs │ ├── Makefile │ ├── NativeMemory.csproj │ ├── Properties │ ├── AndroidManifest.xml │ └── AssemblyInfo.cs │ ├── Resources │ ├── AboutResources.txt │ ├── mipmap-hdpi │ │ └── Icon.png │ ├── mipmap-mdpi │ │ └── Icon.png │ ├── mipmap-xhdpi │ │ └── Icon.png │ ├── mipmap-xxhdpi │ │ └── Icon.png │ └── mipmap-xxxhdpi │ │ └── Icon.png │ ├── TestInstrumentation.cs │ └── TestsSample.cs └── tools ├── DocMerge ├── DocMerge.csproj ├── Injector.cs ├── Main.cs └── Properties │ └── AssemblyInfo.cs └── Generator ├── Generator.cs ├── Generator.csproj ├── GeneratorBase.cs ├── Main.cs └── NOTES.txt /.gitignore: -------------------------------------------------------------------------------- 1 | #Autosave files 2 | *~ 3 | 4 | #build 5 | [Oo]bj/ 6 | [Bb]in/ 7 | packages/ 8 | TestResults/ 9 | 10 | # globs 11 | Makefile.in 12 | *.DS_Store 13 | *.sln.cache 14 | *.suo 15 | *.cache 16 | *.pidb 17 | *.userprefs 18 | *.usertasks 19 | config.log 20 | config.make 21 | config.status 22 | aclocal.m4 23 | install-sh 24 | autom4te.cache/ 25 | *.user 26 | *.tar.gz 27 | tarballs/ 28 | test-results/ 29 | Thumbs.db 30 | 31 | #Mac bundle stuff 32 | *.dmg 33 | *.app 34 | 35 | #resharper 36 | *_Resharper.* 37 | *.Resharper 38 | 39 | #dotCover 40 | *.dotCover 41 | System.Collections.dll 42 | System.Runtime.dll 43 | #generated files 44 | *Resource.designer.cs 45 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Xamarin Inc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Package.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | VulkanSharp 5 | 0.1.10 6 | Xamarin Inc 7 | rodo 8 | https://github.com/mono/VulkanSharp/blob/main/LICENSE 9 | https://github.com/mono/VulkanSharp 10 | false 11 | Open source .NET binding for the Vulkan API 12 | 13 | This is the preview release of the VulkanSharp project. 14 | New in this release: 15 | * updated to Vulkan specs 1.0.69 16 | * added .NETStandard target 17 | 18 | Copyright 2016, 2017 Xamarin Inc 19 | Vulkan C# Bindings 3D VulkanSharp Graphics OpenSource MultiPlatform Android Windows 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VulkanSharp 2 | 3 | This project provides a .NET binding for the 4 | [Vulkan](https://www.khronos.org/vulkan/) API. 5 | 6 | Nuget [package](https://www.nuget.org/packages/VulkanSharp/) 7 | 8 | Check our [samples](https://github.com/mono/VulkanSharp/tree/main/samples) to see examples of using VulkanSharp 9 | 10 | ## Tutorials 11 | 12 | How to use [Validation layers](https://github.com/mono/VulkanSharp/blob/main/docs/development/ValidationLayers.md) and [Debug report](https://github.com/mono/VulkanSharp/blob/main/docs/development/ValidationLayers.md#debug-report-extension) extension 13 | 14 | ## Building 15 | 16 | ### Windows 17 | 18 | To build VulkanSharp, open VulkanSharp.sln in Visual Studio and build the solution. Alternatively you can also build it on the command line, run the `msbuild VulkanSharp.sln` command. It should download the needed dependencies. 19 | 20 | ### Mac/Linux 21 | 22 | To build VulkanSharp, run the `make` command, which will download 23 | the needed dependencies. 24 | 25 | ## Vulkan information 26 | 27 | Specification from the Khronos group 28 | [xhtml](https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html), 29 | [pdf](https://www.khronos.org/registry/vulkan/specs/1.0/pdf/vkspec.pdf) 30 | 31 | To learn more about Vulkan, you can check [Vulkan in 30 32 | minutes](https://renderdoc.org/vulkan-in-30-minutes.html) 33 | 34 | ### Vulkan on Android 35 | 36 | Vulkan on Android (NVIDIA's devices) 37 | [samples](https://developer.nvidia.com/vulkan-android) 38 | 39 | More Android Vulkan samples 40 | [googlesamples](https://github.com/googlesamples/android-vulkan-tutorials), 41 | [examples and demos](https://github.com/SaschaWillems/Vulkan) 42 | -------------------------------------------------------------------------------- /code_of_conduct.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | This project has adopted the code of conduct defined by the Contributor Covenant 4 | to clarify expected behavior in our community. 5 | 6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct). 7 | -------------------------------------------------------------------------------- /docs/en/Vulkan/AttachmentDescriptionFlags.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | 18 | System.Flags 19 | 20 | 21 | 22 | Bitmask specifying additional properties of an attachment 23 | 24 | 25 | 26 | 27 | 28 | 29 | Field 30 | 31 | 0.0.5950.20892 32 | 0.0.6105.39043 33 | 0.0.6106.39464 34 | 0.0.6134.41045 35 | 0.0.6142.19338 36 | 37 | 38 | Vulkan.AttachmentDescriptionFlags 39 | 40 | 41 | To be added. 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/en/Vulkan/Buffer.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a buffer object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/BufferView.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a buffer view object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/ColorSpaceKhr.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | - supported color space of the presentation engine 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.ColorSpaceKhr 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/en/Vulkan/CommandBufferLevel.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Structure specifying a command buffer level 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.CommandBufferLevel 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Field 43 | 44 | 0.0.5950.20892 45 | 0.0.6105.39043 46 | 0.0.6106.39464 47 | 0.0.6134.41045 48 | 0.0.6142.19338 49 | 50 | 51 | Vulkan.CommandBufferLevel 52 | 53 | 54 | To be added. 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/en/Vulkan/CommandBufferResetFlags.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | 18 | System.Flags 19 | 20 | 21 | 22 | Bitmask controlling behavior of a command buffer reset 23 | 24 | 25 | 26 | 27 | 28 | 29 | Field 30 | 31 | 0.0.5950.20892 32 | 0.0.6105.39043 33 | 0.0.6106.39464 34 | 0.0.6134.41045 35 | 0.0.6142.19338 36 | 37 | 38 | Vulkan.CommandBufferResetFlags 39 | 40 | 41 | To be added. 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/en/Vulkan/CommandPool.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a command pool object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/CommandPoolResetFlags.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | 18 | System.Flags 19 | 20 | 21 | 22 | Bitmask controlling behavior of a command pool reset 23 | 24 | 25 | 26 | 27 | 28 | 29 | Field 30 | 31 | 0.0.5950.20892 32 | 0.0.6105.39043 33 | 0.0.6106.39464 34 | 0.0.6134.41045 35 | 0.0.6142.19338 36 | 37 | 38 | Vulkan.CommandPoolResetFlags 39 | 40 | 41 | To be added. 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/en/Vulkan/DebugReportErrorExt.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Unknown VK_EXT_debug_report enumeration type 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.DebugReportErrorExt 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Field 43 | 44 | 0.0.5950.20892 45 | 0.0.6105.39043 46 | 0.0.6106.39464 47 | 0.0.6134.41045 48 | 0.0.6142.19338 49 | 50 | 51 | Vulkan.DebugReportErrorExt 52 | 53 | 54 | To be added. 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/en/Vulkan/DependencyFlags.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | 18 | System.Flags 19 | 20 | 21 | 22 | Bitmask specifying dependencies between subpasses 23 | 24 | 25 | 26 | 27 | 28 | 29 | Field 30 | 31 | 0.0.5950.20892 32 | 0.0.6105.39043 33 | 0.0.6106.39464 34 | 0.0.6134.41045 35 | 0.0.6142.19338 36 | 37 | 38 | Vulkan.DependencyFlags 39 | 40 | 41 | To be added. 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/en/Vulkan/DescriptorPoolCreateFlags.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | 18 | System.Flags 19 | 20 | 21 | 22 | Bitmask specifying certain supported operations on a descriptor pool 23 | 24 | 25 | 26 | 27 | 28 | 29 | Field 30 | 31 | 0.0.5950.20892 32 | 0.0.6105.39043 33 | 0.0.6106.39464 34 | 0.0.6134.41045 35 | 0.0.6142.19338 36 | 37 | 38 | Vulkan.DescriptorPoolCreateFlags 39 | 40 | 41 | To be added. 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/en/Vulkan/DisplayKhr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.5950.20892 7 | 0.0.6105.39043 8 | 0.0.6106.39464 9 | 0.0.6134.41045 10 | 0.0.6142.19338 11 | 12 | 13 | System.Object 14 | 15 | 16 | 17 | Vulkan.INonDispatchableHandleMarshalling 18 | 19 | 20 | 21 | To be added. 22 | To be added. 23 | 24 | 25 | 26 | 27 | 28 | Constructor 29 | 30 | 0.0.5950.20892 31 | 32 | 33 | 34 | To be added. 35 | To be added. 36 | 37 | 38 | 39 | 40 | 41 | Property 42 | 43 | 0.0.6105.39043 44 | 0.0.6106.39464 45 | 0.0.6134.41045 46 | 0.0.6142.19338 47 | 48 | 49 | System.UInt64 50 | 51 | 52 | To be added. 53 | To be added. 54 | To be added. 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/DisplayModeKhr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.5950.20892 7 | 0.0.6105.39043 8 | 0.0.6106.39464 9 | 0.0.6134.41045 10 | 0.0.6142.19338 11 | 12 | 13 | System.Object 14 | 15 | 16 | 17 | Vulkan.INonDispatchableHandleMarshalling 18 | 19 | 20 | 21 | To be added. 22 | To be added. 23 | 24 | 25 | 26 | 27 | 28 | Constructor 29 | 30 | 0.0.5950.20892 31 | 32 | 33 | 34 | To be added. 35 | To be added. 36 | 37 | 38 | 39 | 40 | 41 | Property 42 | 43 | 0.0.6105.39043 44 | 0.0.6106.39464 45 | 0.0.6134.41045 46 | 0.0.6142.19338 47 | 48 | 49 | System.UInt64 50 | 51 | 52 | To be added. 53 | To be added. 54 | To be added. 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/Event.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a event object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/Fence.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a fence object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/FenceCreateFlags.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | 18 | System.Flags 19 | 20 | 21 | 22 | Bitmask specifying initial state and behavior of a fence 23 | 24 | 25 | 26 | 27 | 28 | 29 | Field 30 | 31 | 0.0.5950.20892 32 | 0.0.6105.39043 33 | 0.0.6106.39464 34 | 0.0.6134.41045 35 | 0.0.6142.19338 36 | 37 | 38 | Vulkan.FenceCreateFlags 39 | 40 | 41 | To be added. 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/en/Vulkan/Framebuffer.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a framebuffer object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/FrontFace.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Interpret polygon front-facing orientation 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.FrontFace 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Field 43 | 44 | 0.0.5950.20892 45 | 0.0.6105.39043 46 | 0.0.6106.39464 47 | 0.0.6134.41045 48 | 0.0.6142.19338 49 | 50 | 51 | Vulkan.FrontFace 52 | 53 | 54 | To be added. 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/en/Vulkan/IMarshalling.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.6105.39043 7 | 0.0.6106.39464 8 | 0.0.6134.41045 9 | 0.0.6142.19338 10 | 11 | 12 | 13 | To be added. 14 | To be added. 15 | 16 | 17 | 18 | 19 | 20 | Property 21 | 22 | 0.0.6105.39043 23 | 0.0.6106.39464 24 | 0.0.6134.41045 25 | 0.0.6142.19338 26 | 27 | 28 | System.IntPtr 29 | 30 | 31 | To be added. 32 | To be added. 33 | To be added. 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /docs/en/Vulkan/INonDispatchableHandleMarshalling.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.6105.39043 7 | 0.0.6106.39464 8 | 0.0.6134.41045 9 | 0.0.6142.19338 10 | 11 | 12 | 13 | To be added. 14 | To be added. 15 | 16 | 17 | 18 | 19 | 20 | Property 21 | 22 | 0.0.6105.39043 23 | 0.0.6106.39464 24 | 0.0.6134.41045 25 | 0.0.6142.19338 26 | 27 | 28 | System.UInt64 29 | 30 | 31 | To be added. 32 | To be added. 33 | To be added. 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /docs/en/Vulkan/Image.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a image object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/ImageTiling.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Specifies the tiling arrangement of data in an image 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.ImageTiling 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Field 43 | 44 | 0.0.5950.20892 45 | 0.0.6105.39043 46 | 0.0.6106.39464 47 | 0.0.6134.41045 48 | 0.0.6142.19338 49 | 50 | 51 | Vulkan.ImageTiling 52 | 53 | 54 | To be added. 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/en/Vulkan/ImageView.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a image view object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/IndexType.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Type of index buffer indices 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.IndexType 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Field 43 | 44 | 0.0.5950.20892 45 | 0.0.6105.39043 46 | 0.0.6106.39464 47 | 0.0.6134.41045 48 | 0.0.6142.19338 49 | 50 | 51 | Vulkan.IndexType 52 | 53 | 54 | To be added. 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/en/Vulkan/Instance+DebugReportCallback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.6105.39043 7 | 0.0.6106.39464 8 | 0.0.6134.41045 9 | 0.0.6142.19338 10 | 11 | 12 | System.Delegate 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | Vulkan.Bool32 26 | 27 | 28 | To be added. 29 | To be added. 30 | To be added. 31 | To be added. 32 | To be added. 33 | To be added. 34 | To be added. 35 | To be added. 36 | To be added. 37 | To be added. 38 | To be added. 39 | 40 | 41 | -------------------------------------------------------------------------------- /docs/en/Vulkan/InternalAllocationType.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Allocation type 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.InternalAllocationType 34 | 35 | 36 | - The allocation is intended for execution by the host. 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/en/Vulkan/MemoryHeapFlags.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | 18 | System.Flags 19 | 20 | 21 | 22 | Bitmask specifying attribute flags for a heap 23 | 24 | 25 | 26 | 27 | 28 | 29 | Field 30 | 31 | 0.0.5950.20892 32 | 0.0.6105.39043 33 | 0.0.6106.39464 34 | 0.0.6134.41045 35 | 0.0.6142.19338 36 | 37 | 38 | Vulkan.MemoryHeapFlags 39 | 40 | 41 | To be added. 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/en/Vulkan/NativeMemoryDebug+ReportCallbackDelegate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.6105.39043 7 | 0.0.6106.39464 8 | 0.0.6134.41045 9 | 0.0.6142.19338 10 | 11 | 12 | System.Delegate 13 | 14 | 15 | 16 | 17 | 18 | 19 | System.ParamArray 20 | 21 | 22 | 23 | 24 | 25 | System.Void 26 | 27 | 28 | To be added. 29 | To be added. 30 | To be added. 31 | To be added. 32 | 33 | 34 | -------------------------------------------------------------------------------- /docs/en/Vulkan/NativeMemoryDebug+StackTraceDelegate.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.6105.39043 7 | 0.0.6106.39464 8 | 0.0.6134.41045 9 | 0.0.6142.19338 10 | 11 | 12 | System.Delegate 13 | 14 | 15 | 16 | System.String 17 | 18 | 19 | To be added. 20 | To be added. 21 | To be added. 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/en/Vulkan/Pipeline.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a pipeline object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/PipelineBindPoint.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Specify the bind point of a pipeline object to a command buffer 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.PipelineBindPoint 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Field 43 | 44 | 0.0.5950.20892 45 | 0.0.6105.39043 46 | 0.0.6106.39464 47 | 0.0.6134.41045 48 | 0.0.6142.19338 49 | 50 | 51 | Vulkan.PipelineBindPoint 52 | 53 | 54 | To be added. 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/en/Vulkan/PipelineCacheHeaderVersion.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Encode pipeline cache version 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.PipelineCacheHeaderVersion 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/en/Vulkan/QueryControlFlags.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | 18 | System.Flags 19 | 20 | 21 | 22 | Bitmask specifying constraints on a query 23 | 24 | 25 | 26 | 27 | 28 | 29 | Field 30 | 31 | 0.0.5950.20892 32 | 0.0.6105.39043 33 | 0.0.6106.39464 34 | 0.0.6134.41045 35 | 0.0.6142.19338 36 | 37 | 38 | Vulkan.QueryControlFlags 39 | 40 | 41 | To be added. 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/en/Vulkan/QueryPool.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a query pool object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/RenderPass.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a render pass object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/ResultException.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.5950.20892 7 | 0.0.6105.39043 8 | 0.0.6106.39464 9 | 0.0.6134.41045 10 | 0.0.6142.19338 11 | 12 | 13 | System.Exception 14 | 15 | 16 | 17 | To be added. 18 | To be added. 19 | 20 | 21 | 22 | 23 | 24 | Property 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.Result 34 | 35 | 36 | To be added. 37 | To be added. 38 | To be added. 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /docs/en/Vulkan/Sampler.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a sampler object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/SamplerMipmapMode.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Specify mipmap mode used for texture lookups 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.SamplerMipmapMode 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Field 43 | 44 | 0.0.5950.20892 45 | 0.0.6105.39043 46 | 0.0.6106.39464 47 | 0.0.6134.41045 48 | 0.0.6142.19338 49 | 50 | 51 | Vulkan.SamplerMipmapMode 52 | 53 | 54 | To be added. 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/en/Vulkan/Semaphore.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Object 15 | 16 | 17 | 18 | Vulkan.INonDispatchableHandleMarshalling 19 | 20 | 21 | 22 | Opaque handle to a semaphore object 23 | 24 | 25 | 26 | 27 | 28 | 29 | Constructor 30 | 31 | 0.0.5950.20892 32 | 33 | 34 | 35 | To be added. 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Property 43 | 44 | 0.0.6105.39043 45 | 0.0.6106.39464 46 | 0.0.6134.41045 47 | 0.0.6142.19338 48 | 49 | 50 | System.UInt64 51 | 52 | 53 | To be added. 54 | To be added. 55 | To be added. 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/SparseMemoryBindFlags.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | 18 | System.Flags 19 | 20 | 21 | 22 | Bitmask specifying usage of a sparse memory binding operation 23 | 24 | 25 | 26 | 27 | 28 | 29 | Field 30 | 31 | 0.0.5950.20892 32 | 0.0.6105.39043 33 | 0.0.6106.39464 34 | 0.0.6134.41045 35 | 0.0.6142.19338 36 | 37 | 38 | Vulkan.SparseMemoryBindFlags 39 | 40 | 41 | indicates that the memory being bound is only for the metadata aspect. 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /docs/en/Vulkan/SubpassContents.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Vulkan 7 | 0.0.5950.20892 8 | 0.0.6105.39043 9 | 0.0.6106.39464 10 | 0.0.6134.41045 11 | 0.0.6142.19338 12 | 13 | 14 | System.Enum 15 | 16 | 17 | Specify how commands in the first subpass of a render pass are provided 18 | 19 | 20 | 21 | 22 | 23 | 24 | Field 25 | 26 | 0.0.5950.20892 27 | 0.0.6105.39043 28 | 0.0.6106.39464 29 | 0.0.6134.41045 30 | 0.0.6142.19338 31 | 32 | 33 | Vulkan.SubpassContents 34 | 35 | 36 | To be added. 37 | 38 | 39 | 40 | 41 | 42 | Field 43 | 44 | 0.0.5950.20892 45 | 0.0.6105.39043 46 | 0.0.6106.39464 47 | 0.0.6134.41045 48 | 0.0.6142.19338 49 | 50 | 51 | Vulkan.SubpassContents 52 | 53 | 54 | To be added. 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/en/Vulkan/SurfaceKhr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.5950.20892 7 | 0.0.6105.39043 8 | 0.0.6106.39464 9 | 0.0.6134.41045 10 | 0.0.6142.19338 11 | 12 | 13 | System.Object 14 | 15 | 16 | 17 | Vulkan.INonDispatchableHandleMarshalling 18 | 19 | 20 | 21 | To be added. 22 | To be added. 23 | 24 | 25 | 26 | 27 | 28 | Constructor 29 | 30 | 0.0.5950.20892 31 | 32 | 33 | 34 | To be added. 35 | To be added. 36 | 37 | 38 | 39 | 40 | 41 | Property 42 | 43 | 0.0.6105.39043 44 | 0.0.6106.39464 45 | 0.0.6134.41045 46 | 0.0.6142.19338 47 | 48 | 49 | System.UInt64 50 | 51 | 52 | To be added. 53 | To be added. 54 | To be added. 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/Vulkan/SwapchainKhr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vulkan 6 | 0.0.5950.20892 7 | 0.0.6105.39043 8 | 0.0.6106.39464 9 | 0.0.6134.41045 10 | 0.0.6142.19338 11 | 12 | 13 | System.Object 14 | 15 | 16 | 17 | Vulkan.INonDispatchableHandleMarshalling 18 | 19 | 20 | 21 | To be added. 22 | To be added. 23 | 24 | 25 | 26 | 27 | 28 | Constructor 29 | 30 | 0.0.5950.20892 31 | 32 | 33 | 34 | To be added. 35 | To be added. 36 | 37 | 38 | 39 | 40 | 41 | Property 42 | 43 | 0.0.6105.39043 44 | 0.0.6106.39464 45 | 0.0.6134.41045 46 | 0.0.6142.19338 47 | 48 | 49 | System.UInt64 50 | 51 | 52 | To be added. 53 | To be added. 54 | To be added. 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/en/ns-Vulkan.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | To be added. 4 | To be added. 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/.gitignore: -------------------------------------------------------------------------------- 1 | gendarme-2.10 2 | -------------------------------------------------------------------------------- /netstandard/Vulkan.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard1.1 5 | 6 | 7 | 8 | true 9 | 10 | 11 | true 12 | 13 | 14 | 15 | Vulkan\Additions.cs 16 | 17 | 18 | Vulkan\Commands.cs 19 | 20 | 21 | Vulkan\Enums.cs 22 | 23 | 24 | Vulkan\Handles.cs 25 | 26 | 27 | Vulkan\Helpers.cs 28 | 29 | 30 | Vulkan\Structs.cs 31 | 32 | 33 | Vulkan\Unions.cs 34 | 35 | 36 | Vulkan\Interop\Helpers.cs 37 | 38 | 39 | Vulkan\Interop\ImportedCommands.cs 40 | 41 | 42 | Vulkan\Interop\MarshalStructs.cs 43 | 44 | 45 | Vulkan\Interop\MarshalUnions.cs 46 | 47 | 48 | Vulkan\Properties/AssemblyVisibility.cs 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Widget; 3 | using Android.OS; 4 | using ClearView.Common; 5 | using VulkanSample.Android; 6 | 7 | namespace ClearView.Android 8 | { 9 | [Activity (Label = "ClearView", MainLauncher = true, Icon = "@mipmap/icon")] 10 | public class MainActivity : Activity 11 | { 12 | protected override void OnCreate (Bundle savedInstanceState) 13 | { 14 | base.OnCreate (savedInstanceState); 15 | 16 | // Set our view from the "main" layout resource 17 | SetContentView (Resource.Layout.Main); 18 | 19 | LinearLayout layout = FindViewById (Resource.Id.Layout); 20 | layout.AddView (new VulkanSampleView (ApplicationContext, new ClearViewSample ())); 21 | } 22 | } 23 | } 24 | 25 | 26 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle ("ClearView.Android")] 9 | [assembly: AssemblyDescription ("")] 10 | [assembly: AssemblyConfiguration ("")] 11 | [assembly: AssemblyCompany ("")] 12 | [assembly: AssemblyProduct ("")] 13 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 14 | [assembly: AssemblyTrademark ("")] 15 | [assembly: AssemblyCulture ("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion ("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | 29 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Resources/layout/Main.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Resources/mipmap-hdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/ClearView/ClearView.Android/Resources/mipmap-hdpi/Icon.png -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Resources/mipmap-mdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/ClearView/ClearView.Android/Resources/mipmap-mdpi/Icon.png -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Resources/mipmap-xhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/ClearView/ClearView.Android/Resources/mipmap-xhdpi/Icon.png -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Resources/mipmap-xxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/ClearView/ClearView.Android/Resources/mipmap-xxhdpi/Icon.png -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Resources/mipmap-xxxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/ClearView/ClearView.Android/Resources/mipmap-xxxhdpi/Icon.png -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Android/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Hello World, Click Me! 4 | ClearView 5 | 6 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Common/ClearView.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 7 | {A4DB854E-6B80-4E25-9DED-B530CD549ACE} 8 | Library 9 | ClearView.Common 10 | ClearView.Common 11 | v4.5 12 | Profile7 13 | 14 | 15 | true 16 | full 17 | false 18 | bin\Debug\ 19 | DEBUG; 20 | prompt 21 | 4 22 | false 23 | true 24 | 25 | 26 | full 27 | true 28 | bin\Release\ 29 | prompt 30 | 4 31 | false 32 | true 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | {15253e36-ddde-4c0a-9a6e-7632bacc8f7c} 42 | Vulkan 43 | 44 | 45 | {5C30400B-37A3-48E7-A10A-15A1CF984A9E} 46 | VulkanSample.Common 47 | 48 | 49 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Common/ClearViewSample.cs: -------------------------------------------------------------------------------- 1 | using Vulkan; 2 | using VulkanSample.Common; 3 | 4 | namespace ClearView.Common 5 | { 6 | public class ClearViewSample : VulkanSampleBase 7 | { 8 | CommandBuffer [] commandBuffers; 9 | 10 | CommandBuffer [] CreateCommandBuffers (Image [] images, Framebuffer [] framebuffers, RenderPass renderPass, SurfaceCapabilitiesKhr surfaceCapabilities) 11 | { 12 | var createPoolInfo = new CommandPoolCreateInfo { Flags = CommandPoolCreateFlags.ResetCommandBuffer }; 13 | var commandPool = device.CreateCommandPool (createPoolInfo); 14 | var commandBufferAllocateInfo = new CommandBufferAllocateInfo { 15 | Level = CommandBufferLevel.Primary, 16 | CommandPool = commandPool, 17 | CommandBufferCount = (uint)images.Length 18 | }; 19 | var buffers = device.AllocateCommandBuffers (commandBufferAllocateInfo); 20 | for (int i = 0; i < images.Length; i++) { 21 | 22 | var commandBufferBeginInfo = new CommandBufferBeginInfo (); 23 | buffers [i].Begin (commandBufferBeginInfo); 24 | var renderPassBeginInfo = new RenderPassBeginInfo { 25 | Framebuffer = framebuffers [i], 26 | RenderPass = renderPass, 27 | ClearValues = new ClearValue [] { new ClearValue { Color = new ClearColorValue (new float [] { 0.9f, 0.7f, 0.0f, 1.0f }) } }, 28 | RenderArea = new Rect2D { Extent = surfaceCapabilities.CurrentExtent } 29 | }; 30 | buffers [i].CmdBeginRenderPass (renderPassBeginInfo, SubpassContents.Inline); 31 | buffers [i].CmdEndRenderPass (); 32 | buffers [i].End (); 33 | } 34 | return buffers; 35 | } 36 | 37 | public override void Initialize (PhysicalDevice physicalDevice, SurfaceKhr surface) 38 | { 39 | base.Initialize (physicalDevice, surface); 40 | commandBuffers = CreateCommandBuffers (images, framebuffers, renderPass, surfaceCapabilities); 41 | } 42 | 43 | public override void DrawFrame () 44 | { 45 | if (!initialized) return; 46 | 47 | uint nextIndex = device.AcquireNextImageKHR (swapchain, ulong.MaxValue, semaphore); 48 | device.ResetFence (fence); 49 | var submitInfo = new SubmitInfo { 50 | WaitSemaphores = new Semaphore [] { semaphore }, 51 | WaitDstStageMask = new PipelineStageFlags [] { PipelineStageFlags.AllGraphics }, 52 | CommandBuffers = new CommandBuffer [] { commandBuffers [nextIndex] } 53 | }; 54 | queue.Submit (submitInfo, fence); 55 | device.WaitForFence (fence, true, 100000000); 56 | var presentInfo = new PresentInfoKhr { 57 | Swapchains = new SwapchainKhr [] { swapchain }, 58 | ImageIndices = new uint [] { nextIndex } 59 | }; 60 | queue.PresentKHR (presentInfo); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("Vulkan")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("Vulkan")] 12 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("0.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | [assembly: InternalsVisibleTo("Vulkan.Android")] 29 | [assembly: InternalsVisibleTo("Vulkan.Windows")] 30 | [assembly: InternalsVisibleTo("Vulkan.iOS")] 31 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Windows/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Windows/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using ClearView.Common; 4 | using VulkanSample.Windows; 5 | 6 | namespace ClearView.Windows 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// Der Haupteinstiegspunkt für die Anwendung. 12 | /// 13 | [STAThread] 14 | static void Main () 15 | { 16 | Application.EnableVisualStyles (); 17 | Application.SetCompatibleTextRenderingDefault (false); 18 | 19 | var form = new Form (); 20 | form.Controls.Add (new VulkanSampleControl (new ClearViewSample ()) { Dock = DockStyle.Fill }); 21 | 22 | Application.Run (form); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Windows/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Allgemeine Informationen über eine Assembly werden über die folgenden 6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 7 | // die einer Assembly zugeordnet sind. 8 | [assembly: AssemblyTitle("ClearView.Windows")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly 18 | // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von 19 | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. 20 | [assembly: ComVisible(false)] 21 | 22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 23 | [assembly: Guid("04a65d55-5c86-46c6-8394-338a8cf3dc10")] 24 | 25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 26 | // 27 | // Hauptversion 28 | // Nebenversion 29 | // Buildnummer 30 | // Revision 31 | // 32 | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, 33 | // übernehmen, indem Sie "*" eingeben: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /samples/ClearView/ClearView.Windows/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/InspectorView.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | using Android.Text.Method; 3 | using Android.Widget; 4 | using Vulkan; 5 | using Vulkan.Android; 6 | 7 | namespace Inspector 8 | { 9 | public class InspectorView : VulkanView 10 | { 11 | TextView textView; 12 | bool inspectionDone = false; 13 | 14 | public InspectorView (Context context, TextView view) : base (context, CreateInstance ()) 15 | { 16 | textView = view; 17 | textView.MovementMethod = new ScrollingMovementMethod(); 18 | textView.Append ("Vulkan instance created\n\n"); 19 | } 20 | 21 | protected override void NativeWindowAcquired () 22 | { 23 | if (!inspectionDone) 24 | InspectVulkan (); 25 | } 26 | 27 | static Instance CreateInstance () 28 | { 29 | return new Instance (new InstanceCreateInfo () { 30 | ApplicationInfo = new Vulkan.ApplicationInfo () { 31 | ApplicationName = "Vulkan Android Inspector", 32 | ApiVersion = Version.Make (1, 0, 0) 33 | }, 34 | EnabledExtensionNames = new string [] { "VK_KHR_surface", "VK_KHR_android_surface" } 35 | }); 36 | } 37 | 38 | void InspectVulkan () 39 | { 40 | var surface = Instance.CreateAndroidSurfaceKHR (new AndroidSurfaceCreateInfoKhr () { 41 | Window = aNativeWindow 42 | }); 43 | 44 | var inspector = new Common.Inspector { Surface = surface, AppendText = (string s) => textView.Append (s) }; 45 | inspector.Inspect (); 46 | 47 | inspectionDone = true; 48 | } 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Android.App; 3 | using Android.Widget; 4 | using Android.OS; 5 | using Inspector.Android; 6 | 7 | namespace Inspector 8 | { 9 | [Activity (Label = "Inspector", MainLauncher = true, Icon = "@mipmap/icon")] 10 | public class MainActivity : Activity 11 | { 12 | TextView textView; 13 | 14 | protected override void OnCreate (Bundle savedInstanceState) 15 | { 16 | base.OnCreate (savedInstanceState); 17 | 18 | // Set our view from the "main" layout resource 19 | SetContentView (Resource.Layout.Main); 20 | 21 | textView = FindViewById (Resource.Id.TextView); 22 | var layout = FindViewById (Resource.Id.Layout); 23 | try { 24 | var inspectorView = new InspectorView (BaseContext, textView); 25 | layout.AddView (inspectorView, -1, 1); 26 | } catch (Exception e) { 27 | textView.Append (string.Format ("Unable to instantiate Vulkan\n\nException:\n{0}", e)); 28 | } 29 | } 30 | } 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle ("Inspector.Android")] 9 | [assembly: AssemblyDescription ("")] 10 | [assembly: AssemblyConfiguration ("")] 11 | [assembly: AssemblyCompany ("")] 12 | [assembly: AssemblyProduct ("")] 13 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 14 | [assembly: AssemblyTrademark ("")] 15 | [assembly: AssemblyCulture ("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion ("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | 29 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Resources/layout/Main.axml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 13 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Resources/mipmap-hdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/Inspector/Inspector.Android/Resources/mipmap-hdpi/Icon.png -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Resources/mipmap-mdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/Inspector/Inspector.Android/Resources/mipmap-mdpi/Icon.png -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Resources/mipmap-xhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/Inspector/Inspector.Android/Resources/mipmap-xhdpi/Icon.png -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Resources/mipmap-xxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/Inspector/Inspector.Android/Resources/mipmap-xxhdpi/Icon.png -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Resources/mipmap-xxxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/Inspector/Inspector.Android/Resources/mipmap-xxxhdpi/Icon.png -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Android/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Hello World, Click Me! 4 | Inspector 5 | 6 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Common/Inspector.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 7 | {3A20E0E2-536D-481C-A31E-3C3D5AB36CDF} 8 | Library 9 | Inspector.Common 10 | Inspector.Common 11 | v4.5 12 | Profile7 13 | 14 | 15 | true 16 | full 17 | false 18 | bin\Debug\ 19 | DEBUG; 20 | prompt 21 | 4 22 | false 23 | true 24 | 25 | 26 | full 27 | true 28 | bin\Release\ 29 | prompt 30 | 4 31 | false 32 | true 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | {15253e36-ddde-4c0a-9a6e-7632bacc8f7c} 42 | Vulkan 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("Inspector.Common")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("0.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | [assembly: InternalsVisibleTo("Vulkan.Android")] 29 | [assembly: InternalsVisibleTo("Vulkan.Windows")] 30 | [assembly: InternalsVisibleTo("Vulkan.iOS")] 31 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Windows/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Windows/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Windows/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace InspectorWin 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Windows/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Windows/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using InspectorWin; 3 | using Vulkan; 4 | using Vulkan.Windows; 5 | 6 | namespace Inspector.Windows 7 | { 8 | /// 9 | /// Interaction logic for MainWindow.xaml 10 | /// 11 | public partial class MainWindow : Window 12 | { 13 | public MainWindow () 14 | { 15 | InitializeComponent (); 16 | 17 | var hWnd = new System.Windows.Interop.WindowInteropHelper (this).EnsureHandle (); 18 | var hInstance = System.Runtime.InteropServices.Marshal.GetHINSTANCE (typeof (App).Module); 19 | var instance = new Instance (new InstanceCreateInfo { EnabledExtensionNames = new string [] { "VK_KHR_surface", "VK_KHR_win32_surface" } }); 20 | var surface = instance.CreateWin32SurfaceKHR (new Win32SurfaceCreateInfoKhr { Hwnd = hWnd, Hinstance = hInstance }); 21 | 22 | var inspector = new Common.Inspector { AppendText = (string s) => { textBox.Text += s; }, Surface = surface }; 23 | 24 | inspector.Inspect (); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Windows/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("Inspector.Windows")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("Inspector.Windows")] 15 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("1.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Windows/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Inspector/Inspector.Windows/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /samples/VulkanSample/VulkanSample.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | using Android.App; 5 | 6 | // General Information about an assembly is controlled through the following 7 | // set of attributes. Change these attribute values to modify the information 8 | // associated with an assembly. 9 | [assembly: AssemblyTitle("VulkanSample.Android")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("")] 14 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | [assembly: ComVisible(false)] 18 | 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Build and Revision Numbers 27 | // by using the '*' as shown below: 28 | // [assembly: AssemblyVersion("1.0.*")] 29 | [assembly: AssemblyVersion("1.0.0.0")] 30 | [assembly: AssemblyFileVersion("1.0.0.0")] 31 | -------------------------------------------------------------------------------- /samples/VulkanSample/VulkanSample.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. -------------------------------------------------------------------------------- /samples/VulkanSample/VulkanSample.Android/VulkanSampleView.cs: -------------------------------------------------------------------------------- 1 | using Android.Content; 2 | using Android.Graphics; 3 | using Vulkan; 4 | using Vulkan.Android; 5 | using VulkanSample.Common; 6 | 7 | namespace VulkanSample.Android 8 | { 9 | public class VulkanSampleView : VulkanView 10 | { 11 | private readonly IVulkanSample _vulkanSample; 12 | private PhysicalDevice _physicalDevice; 13 | private SurfaceKhr _surface; 14 | 15 | public VulkanSampleView (Context context, IVulkanSample vulkanSample) : base (context) 16 | { 17 | _vulkanSample = vulkanSample; 18 | } 19 | 20 | protected override void NativeWindowAcquired () 21 | { 22 | _physicalDevice = Instance.EnumeratePhysicalDevices () [0]; 23 | _surface = Instance.CreateAndroidSurfaceKHR (new AndroidSurfaceCreateInfoKhr { Window = aNativeWindow }); 24 | _vulkanSample.Initialize (_physicalDevice, _surface); 25 | 26 | base.NativeWindowAcquired (); 27 | } 28 | 29 | protected override void OnDraw (Canvas canvas) 30 | { 31 | _vulkanSample.DrawFrame (); 32 | } 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /samples/VulkanSample/VulkanSample.Common/IVulkanSample.cs: -------------------------------------------------------------------------------- 1 | using Vulkan; 2 | 3 | namespace VulkanSample.Common 4 | { 5 | public interface IVulkanSample 6 | { 7 | void DrawFrame (); 8 | void Initialize (PhysicalDevice physicalDevice, SurfaceKhr surface); 9 | } 10 | } -------------------------------------------------------------------------------- /samples/VulkanSample/VulkanSample.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("VulkanSample.Common")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("0.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | [assembly: InternalsVisibleTo("Vulkan.Android")] 29 | [assembly: InternalsVisibleTo("Vulkan.Windows")] 30 | [assembly: InternalsVisibleTo("Vulkan.iOS")] 31 | -------------------------------------------------------------------------------- /samples/VulkanSample/VulkanSample.Common/VulkanSample.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 7 | {5C30400B-37A3-48E7-A10A-15A1CF984A9E} 8 | Library 9 | VulkanSample.Common 10 | VulkanSample.Common 11 | v4.5 12 | Profile7 13 | 14 | 15 | true 16 | full 17 | false 18 | bin\Debug\ 19 | DEBUG; 20 | prompt 21 | 4 22 | false 23 | true 24 | 25 | 26 | full 27 | true 28 | bin\Release\ 29 | prompt 30 | 4 31 | false 32 | true 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | {15253E36-DDDE-4C0A-9A6E-7632BACC8F7C} 42 | Vulkan 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /samples/VulkanSample/VulkanSample.Windows/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Allgemeine Informationen über eine Assembly werden über die folgenden 6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 7 | // die einer Assembly zugeordnet sind. 8 | [assembly: AssemblyTitle("VulkanSample.Windows")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly 18 | // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von 19 | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. 20 | [assembly: ComVisible(false)] 21 | 22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 23 | [assembly: Guid("bfab0e35-a090-4d83-a5a6-5df72ada2f95")] 24 | 25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 26 | // 27 | // Hauptversion 28 | // Nebenversion 29 | // Buildnummer 30 | // Revision 31 | // 32 | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, 33 | // indem Sie "*" wie unten gezeigt eingeben: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /samples/VulkanSample/VulkanSample.Windows/VulkanSampleControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using Vulkan; 4 | using Vulkan.Windows; 5 | using VulkanSample.Common; 6 | 7 | namespace VulkanSample.Windows 8 | { 9 | public class VulkanSampleControl : VulkanControl 10 | { 11 | private IVulkanSample _vulkanSample; 12 | private PhysicalDevice _physicalDevice; 13 | 14 | public VulkanSampleControl (IVulkanSample vulkanSample) 15 | { 16 | _vulkanSample = vulkanSample; 17 | } 18 | 19 | protected override void OnLoad (EventArgs e) 20 | { 21 | base.OnLoad (e); 22 | 23 | _physicalDevice = Instance.EnumeratePhysicalDevices () [0]; 24 | _vulkanSample.Initialize (_physicalDevice, Surface); 25 | } 26 | 27 | protected override void OnPaint (PaintEventArgs e) 28 | { 29 | base.OnPaint (e); 30 | 31 | _vulkanSample.DrawFrame (); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using Android.App; 2 | using Android.Widget; 3 | using Android.OS; 4 | using Samples.Common; 5 | using VulkanSample.Android; 6 | using XLogo.Common; 7 | 8 | namespace XLogo 9 | { 10 | [Activity (Label = "XLogo", MainLauncher = true, Icon = "@mipmap/icon", ScreenOrientation = Android.Content.PM.ScreenOrientation.SensorPortrait)] 11 | public class MainActivity : Activity 12 | { 13 | protected override void OnCreate (Bundle savedInstanceState) 14 | { 15 | base.OnCreate (savedInstanceState); 16 | 17 | // Set our view from the "main" layout resource 18 | SetContentView (Resource.Layout.Main); 19 | 20 | LinearLayout layout = FindViewById (Resource.Id.Layout); 21 | layout.AddView (new VulkanSampleView (ApplicationContext, new XLogoSample ())); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle ("XLogo")] 9 | [assembly: AssemblyDescription ("")] 10 | [assembly: AssemblyConfiguration ("")] 11 | [assembly: AssemblyCompany ("")] 12 | [assembly: AssemblyProduct ("")] 13 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 14 | [assembly: AssemblyTrademark ("")] 15 | [assembly: AssemblyCulture ("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion ("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | 29 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Resources/layout/Main.axml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Resources/mipmap-hdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/XLogo/XLogo.Android/Resources/mipmap-hdpi/Icon.png -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Resources/mipmap-mdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/XLogo/XLogo.Android/Resources/mipmap-mdpi/Icon.png -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Resources/mipmap-xhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/XLogo/XLogo.Android/Resources/mipmap-xhdpi/Icon.png -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Resources/mipmap-xxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/XLogo/XLogo.Android/Resources/mipmap-xxhdpi/Icon.png -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Resources/mipmap-xxxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/XLogo/XLogo.Android/Resources/mipmap-xxxhdpi/Icon.png -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Android/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Hello World, Click Me! 4 | XLogo 5 | 6 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("XLogo.Common")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("0.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | [assembly: InternalsVisibleTo("Vulkan.Android")] 29 | [assembly: InternalsVisibleTo("Vulkan.Windows")] 30 | [assembly: InternalsVisibleTo("Vulkan.iOS")] 31 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Common/Shaders/Shader.frag: -------------------------------------------------------------------------------- 1 | #version 400 2 | 3 | #extension GL_ARB_separate_shader_objects : enable 4 | #extension GL_ARB_shading_language_420pack : enable 5 | 6 | layout (location = 0) out vec4 fragColor; 7 | 8 | void main() 9 | { 10 | fragColor = vec4 (0.204, 0.596, 0.859, 1.0); 11 | } 12 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Common/Shaders/Shader.vert: -------------------------------------------------------------------------------- 1 | #version 400 2 | 3 | #extension GL_ARB_separate_shader_objects : enable 4 | #extension GL_ARB_shading_language_420pack : enable 5 | 6 | layout (location = 0) in vec3 vpos; 7 | layout (set = 0, binding = 0) uniform AreaUB 8 | { 9 | float width; 10 | float height; 11 | } area; 12 | 13 | void main() 14 | { 15 | vec3 centered = vpos - vec3(0.015, -0.013, 0); 16 | gl_Position = vec4(centered.x*50.0, centered.y*50*area.width/area.height, 0.0, 1.0); 17 | } 18 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Common/Shaders/shader.frag.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/XLogo/XLogo.Common/Shaders/shader.frag.spv -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Common/Shaders/shader.vert.spv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/samples/XLogo/XLogo.Common/Shaders/shader.vert.spv -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Windows/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Windows/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | using Samples.Common; 7 | using VulkanSample.Windows; 8 | using XLogo.Common; 9 | 10 | namespace XLogo.Windows 11 | { 12 | static class Program 13 | { 14 | /// 15 | /// Der Haupteinstiegspunkt für die Anwendung. 16 | /// 17 | [STAThread] 18 | static void Main () 19 | { 20 | Application.EnableVisualStyles (); 21 | Application.SetCompatibleTextRenderingDefault (false); 22 | 23 | var form = new Form (); 24 | form.Controls.Add (new VulkanSampleControl (new XLogoSample ()) { Dock = DockStyle.Fill }); 25 | 26 | Application.Run (form); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Windows/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // Allgemeine Informationen über eine Assembly werden über die folgenden 6 | // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, 7 | // die einer Assembly zugeordnet sind. 8 | [assembly: AssemblyTitle("XLogo.Windows")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("")] 13 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly 18 | // für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von 19 | // COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. 20 | [assembly: ComVisible(false)] 21 | 22 | // Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird 23 | [assembly: Guid("f57a3f96-96c0-4792-8364-62404c03401e")] 24 | 25 | // Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: 26 | // 27 | // Hauptversion 28 | // Nebenversion 29 | // Buildnummer 30 | // Revision 31 | // 32 | // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, 33 | // übernehmen, indem Sie "*" eingeben: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /samples/XLogo/XLogo.Windows/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Platforms/Android/Handles.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | using System.Runtime.InteropServices; 13 | using System.Collections.Generic; 14 | 15 | namespace Vulkan.Android 16 | { 17 | public static class InstanceExtension 18 | { 19 | public static SurfaceKhr CreateAndroidSurfaceKHR (this Instance instance, AndroidSurfaceCreateInfoKhr pCreateInfo, AllocationCallbacks pAllocator = null) 20 | { 21 | Result result; 22 | SurfaceKhr pSurface; 23 | unsafe { 24 | pSurface = new SurfaceKhr (); 25 | 26 | fixed (UInt64* ptrpSurface = &pSurface.m) { 27 | result = Android.Interop.NativeMethods.vkCreateAndroidSurfaceKHR (instance.m, pCreateInfo != null ? pCreateInfo.m : (Android.Interop.AndroidSurfaceCreateInfoKhr*)default(IntPtr), pAllocator != null ? pAllocator.m : null, ptrpSurface); 28 | } 29 | if (result != Result.Success) 30 | throw new ResultException (result); 31 | 32 | return pSurface; 33 | } 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/Platforms/Android/Interop/ImportedCommands.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | using System.Runtime.InteropServices; 13 | using Vulkan.Interop; 14 | 15 | namespace Vulkan.Android.Interop 16 | { 17 | internal static class NativeMethods 18 | { 19 | const string VulkanLibrary = "vulkan"; 20 | 21 | [DllImport (VulkanLibrary, CallingConvention = CallingConvention.Winapi)] 22 | internal static unsafe extern Result vkCreateAndroidSurfaceKHR (IntPtr instance, AndroidSurfaceCreateInfoKhr* pCreateInfo, Vulkan.Interop.AllocationCallbacks* pAllocator, UInt64* pSurface); 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Platforms/Android/Interop/MarshalStructs.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | 13 | namespace Vulkan.Android.Interop 14 | { 15 | internal partial struct AndroidSurfaceCreateInfoKhr 16 | { 17 | internal StructureType SType; 18 | internal IntPtr Next; 19 | internal UInt32 Flags; 20 | internal IntPtr Window; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/Platforms/Android/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("Vulkan.Android")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.0")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /src/Platforms/Android/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /src/Platforms/Android/Resources/values/Strings.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Vulkan.Android 4 | 5 | -------------------------------------------------------------------------------- /src/Platforms/Android/Structs.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | using System.Runtime.InteropServices; 13 | 14 | namespace Vulkan.Android 15 | { 16 | unsafe public partial class AndroidSurfaceCreateInfoKhr : MarshalledObject 17 | { 18 | public UInt32 Flags { 19 | get { return m->Flags; } 20 | set { m->Flags = value; } 21 | } 22 | 23 | public IntPtr Window { 24 | get { return m->Window; } 25 | set { m->Window = value; } 26 | } 27 | internal Android.Interop.AndroidSurfaceCreateInfoKhr* m { 28 | 29 | get { 30 | return (Android.Interop.AndroidSurfaceCreateInfoKhr*)native.Handle; 31 | } 32 | } 33 | 34 | public AndroidSurfaceCreateInfoKhr () 35 | { 36 | native = Vulkan.Interop.Structure.Allocate (typeof (Android.Interop.AndroidSurfaceCreateInfoKhr)); 37 | Initialize (); 38 | } 39 | 40 | internal AndroidSurfaceCreateInfoKhr (NativePointer pointer) 41 | { 42 | native = pointer; 43 | Initialize (); 44 | } 45 | 46 | 47 | internal void Initialize () 48 | { 49 | m->SType = StructureType.AndroidSurfaceCreateInfoKhr; 50 | } 51 | 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/Platforms/Android/VulkanView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Android.Content; 3 | using Android.Views; 4 | 5 | using Java.Interop; 6 | using System.Runtime.InteropServices; 7 | 8 | namespace Vulkan.Android 9 | { 10 | public class VulkanView : SurfaceView, ISurfaceHolderCallback 11 | { 12 | public Instance Instance; 13 | protected IntPtr aNativeWindow = IntPtr.Zero; 14 | 15 | public VulkanView (Context context, Instance instance = null) : base (context) 16 | { 17 | Holder.AddCallback (this); 18 | if (instance == null) 19 | CreateDefaultInstance (); 20 | else 21 | Instance = instance; 22 | SetWillNotDraw (false); 23 | } 24 | 25 | void AcquireNativeWindow (ISurfaceHolder holder) 26 | { 27 | if (aNativeWindow != IntPtr.Zero) 28 | NativeMethods.ANativeWindow_release (aNativeWindow); 29 | 30 | aNativeWindow = NativeMethods.ANativeWindow_fromSurface (JniEnvironment.EnvironmentPointer, Holder.Surface.Handle); 31 | NativeWindowAcquired (); 32 | } 33 | 34 | public void SurfaceCreated (ISurfaceHolder holder) 35 | { 36 | AcquireNativeWindow (holder); 37 | } 38 | 39 | public void SurfaceDestroyed (ISurfaceHolder holder) 40 | { 41 | if (aNativeWindow != IntPtr.Zero) 42 | NativeMethods.ANativeWindow_release (aNativeWindow); 43 | 44 | aNativeWindow = IntPtr.Zero; 45 | } 46 | 47 | public void SurfaceChanged (ISurfaceHolder holder, global::Android.Graphics.Format format, int w, int h) 48 | { 49 | } 50 | 51 | protected virtual void NativeWindowAcquired () 52 | { 53 | } 54 | 55 | protected void CreateDefaultInstance () 56 | { 57 | Instance = new Instance (new InstanceCreateInfo () { 58 | EnabledExtensionNames = new string [] { "VK_KHR_surface", "VK_KHR_android_surface" }, 59 | ApplicationInfo = new ApplicationInfo () { 60 | ApiVersion = Vulkan.Version.Make (1, 0, 0) 61 | } 62 | }); 63 | } 64 | } 65 | 66 | internal static class NativeMethods 67 | { 68 | const string AndroidRuntimeLibrary = "android"; 69 | 70 | [DllImport (AndroidRuntimeLibrary)] 71 | internal static unsafe extern IntPtr ANativeWindow_fromSurface (IntPtr jniEnv, IntPtr handle); 72 | 73 | [DllImport (AndroidRuntimeLibrary)] 74 | internal static unsafe extern void ANativeWindow_release (IntPtr window); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/Platforms/Windows/Additions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Vulkan.Windows 4 | { 5 | public struct SecurityAttributes 6 | { 7 | public int Length; 8 | public IntPtr SecurityDescriptor; 9 | public int InheritHandle; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Platforms/Windows/Handles.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | using System.Runtime.InteropServices; 13 | using System.Collections.Generic; 14 | 15 | namespace Vulkan.Windows 16 | { 17 | public static class InstanceExtension 18 | { 19 | public static SurfaceKhr CreateWin32SurfaceKHR (this Instance instance, Win32SurfaceCreateInfoKhr pCreateInfo, AllocationCallbacks pAllocator = null) 20 | { 21 | Result result; 22 | SurfaceKhr pSurface; 23 | unsafe { 24 | pSurface = new SurfaceKhr (); 25 | 26 | fixed (UInt64* ptrpSurface = &pSurface.m) { 27 | result = Windows.Interop.NativeMethods.vkCreateWin32SurfaceKHR (instance.m, pCreateInfo != null ? pCreateInfo.m : (Windows.Interop.Win32SurfaceCreateInfoKhr*)default(IntPtr), pAllocator != null ? pAllocator.m : null, ptrpSurface); 28 | } 29 | if (result != Result.Success) 30 | throw new ResultException (result); 31 | 32 | return pSurface; 33 | } 34 | } 35 | } 36 | 37 | public static class PhysicalDeviceExtension 38 | { 39 | public static Bool32 GetWin32PresentationSupportKHR (this PhysicalDevice physicalDevice, UInt32 queueFamilyIndex) 40 | { 41 | unsafe { 42 | return Windows.Interop.NativeMethods.vkGetPhysicalDeviceWin32PresentationSupportKHR (physicalDevice.m, queueFamilyIndex); 43 | } 44 | } 45 | } 46 | 47 | public static class DeviceExtension 48 | { 49 | public static IntPtr GetMemoryWin32HandleNV (this Device device, DeviceMemory memory, ExternalMemoryHandleTypeFlagsNv handleType) 50 | { 51 | Result result; 52 | IntPtr pHandle; 53 | unsafe { 54 | pHandle = new IntPtr (); 55 | result = Windows.Interop.NativeMethods.vkGetMemoryWin32HandleNV (device.m, memory != null ? memory.m : default(UInt64), handleType, &pHandle); 56 | if (result != Result.Success) 57 | throw new ResultException (result); 58 | 59 | return pHandle; 60 | } 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/Platforms/Windows/Interop/ImportedCommands.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | using System.Runtime.InteropServices; 13 | using Vulkan.Interop; 14 | 15 | namespace Vulkan.Windows.Interop 16 | { 17 | internal static class NativeMethods 18 | { 19 | const string VulkanLibrary = "vulkan-1"; 20 | 21 | [DllImport (VulkanLibrary, CallingConvention = CallingConvention.Winapi)] 22 | internal static unsafe extern Result vkCreateWin32SurfaceKHR (IntPtr instance, Win32SurfaceCreateInfoKhr* pCreateInfo, Vulkan.Interop.AllocationCallbacks* pAllocator, UInt64* pSurface); 23 | 24 | [DllImport (VulkanLibrary, CallingConvention = CallingConvention.Winapi)] 25 | internal static unsafe extern Bool32 vkGetPhysicalDeviceWin32PresentationSupportKHR (IntPtr physicalDevice, UInt32 queueFamilyIndex); 26 | 27 | [DllImport (VulkanLibrary, CallingConvention = CallingConvention.Winapi)] 28 | internal static unsafe extern Result vkGetMemoryWin32HandleNV (IntPtr device, UInt64 memory, ExternalMemoryHandleTypeFlagsNv handleType, IntPtr* pHandle); 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Platforms/Windows/Interop/MarshalStructs.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | 13 | namespace Vulkan.Windows.Interop 14 | { 15 | internal partial struct Win32SurfaceCreateInfoKhr 16 | { 17 | internal StructureType SType; 18 | internal IntPtr Next; 19 | internal UInt32 Flags; 20 | internal IntPtr Hinstance; 21 | internal IntPtr Hwnd; 22 | } 23 | 24 | internal partial struct ImportMemoryWin32HandleInfoNv 25 | { 26 | internal StructureType SType; 27 | internal IntPtr Next; 28 | internal ExternalMemoryHandleTypeFlagsNv HandleType; 29 | internal IntPtr Handle; 30 | } 31 | 32 | internal partial struct ExportMemoryWin32HandleInfoNv 33 | { 34 | internal StructureType SType; 35 | internal IntPtr Next; 36 | internal IntPtr Attributes; 37 | internal UInt32 DwAccess; 38 | } 39 | 40 | internal partial struct Win32KeyedMutexAcquireReleaseInfoNv 41 | { 42 | internal StructureType SType; 43 | internal IntPtr Next; 44 | internal UInt32 AcquireCount; 45 | internal IntPtr AcquireSyncs; 46 | internal IntPtr AcquireKeys; 47 | internal IntPtr AcquireTimeoutMilliseconds; 48 | internal UInt32 ReleaseCount; 49 | internal IntPtr ReleaseSyncs; 50 | internal IntPtr ReleaseKeys; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/Platforms/Windows/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("Vulkan.Windows")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("Copyright (c) Xamarin Inc")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.0")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /src/Platforms/Windows/VulkanControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Windows.Forms; 6 | 7 | namespace Vulkan.Windows 8 | { 9 | public class VulkanControl : UserControl 10 | { 11 | public Instance Instance; 12 | public SurfaceKhr Surface; 13 | 14 | public VulkanControl (Instance instance = null) : base () 15 | { 16 | if (instance == null) 17 | CreateDefaultInstance (); 18 | else 19 | Instance = instance; 20 | } 21 | 22 | #if DEBUG 23 | protected void CreateDefaultInstance () 24 | { 25 | var layerProperties = Commands.EnumerateInstanceLayerProperties (); 26 | 27 | var layersToEnable = layerProperties.Any (l => l.LayerName == "VK_LAYER_LUNARG_standard_validation") 28 | ? new [] { "VK_LAYER_LUNARG_standard_validation" } 29 | : new string [0]; 30 | 31 | Instance = new Instance (new InstanceCreateInfo { 32 | EnabledExtensionNames = new string [] { "VK_KHR_surface", "VK_KHR_win32_surface", "VK_EXT_debug_report" }, 33 | EnabledLayerNames = layersToEnable, 34 | ApplicationInfo = new ApplicationInfo { 35 | ApiVersion = Vulkan.Version.Make (1, 0, 0) 36 | } 37 | }); 38 | 39 | Instance.EnableDebug (DebugCallback); 40 | } 41 | 42 | private Bool32 DebugCallback (DebugReportFlagsExt flags, DebugReportObjectTypeExt objectType, ulong objectHandle, IntPtr location, int messageCode, IntPtr layerPrefix, IntPtr message, IntPtr userData) 43 | { 44 | Debug.WriteLine ($"{flags}: {Marshal.PtrToStringAnsi (message)}"); 45 | return true; 46 | } 47 | 48 | #else 49 | protected void CreateDefaultInstance () 50 | { 51 | Instance = new Instance (new InstanceCreateInfo () { 52 | EnabledExtensionNames = new string [] { "VK_KHR_surface", "VK_KHR_win32_surface" }, 53 | ApplicationInfo = new ApplicationInfo () { 54 | ApiVersion = Vulkan.Version.Make (1, 0, 0) 55 | } 56 | }); 57 | } 58 | #endif 59 | 60 | protected override void OnLoad (EventArgs e) 61 | { 62 | base.OnLoad (e); 63 | 64 | Surface = Instance.CreateWin32SurfaceKHR ( 65 | new Win32SurfaceCreateInfoKhr { 66 | Hwnd = Handle, 67 | Hinstance = Process.GetCurrentProcess ().Handle 68 | }); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/Platforms/iOS/Handles.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | using System.Runtime.InteropServices; 13 | using System.Collections.Generic; 14 | 15 | namespace Vulkan.iOS 16 | { 17 | public static class InstanceExtension 18 | { 19 | public static SurfaceKhr CreateIOSSurfaceMVK (this Instance instance, IOSSurfaceCreateInfoMvk pCreateInfo, AllocationCallbacks pAllocator = null) 20 | { 21 | Result result; 22 | SurfaceKhr pSurface; 23 | unsafe { 24 | pSurface = new SurfaceKhr (); 25 | 26 | fixed (UInt64* ptrpSurface = &pSurface.m) { 27 | result = iOS.Interop.NativeMethods.vkCreateIOSSurfaceMVK (instance.m, pCreateInfo != null ? pCreateInfo.m : (iOS.Interop.IOSSurfaceCreateInfoMvk*)default(IntPtr), pAllocator != null ? pAllocator.m : null, ptrpSurface); 28 | } 29 | if (result != Result.Success) 30 | throw new ResultException (result); 31 | 32 | return pSurface; 33 | } 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/Platforms/iOS/Interop/ImportedCommands.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | using System.Runtime.InteropServices; 13 | using Vulkan.Interop; 14 | 15 | namespace Vulkan.iOS.Interop 16 | { 17 | internal static class NativeMethods 18 | { 19 | const string VulkanLibrary = "__Internal"; 20 | 21 | [DllImport (VulkanLibrary, CallingConvention = CallingConvention.Winapi)] 22 | internal static unsafe extern Result vkCreateIOSSurfaceMVK (IntPtr instance, IOSSurfaceCreateInfoMvk* pCreateInfo, Vulkan.Interop.AllocationCallbacks* pAllocator, UInt64* pSurface); 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Platforms/iOS/Interop/MarshalStructs.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | 13 | namespace Vulkan.iOS.Interop 14 | { 15 | internal partial struct IOSSurfaceCreateInfoMvk 16 | { 17 | internal StructureType SType; 18 | internal IntPtr Next; 19 | internal UInt32 Flags; 20 | internal IntPtr View; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/Platforms/iOS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Vulkan.iOS")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Vulkan.iOS")] 13 | [assembly: AssemblyCopyright("Copyright (c) Xamarin Inc")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("1d44d14a-8a7a-4dd9-837d-e7f50ef2ada6")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/Platforms/iOS/Structs.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | using System.Runtime.InteropServices; 13 | 14 | namespace Vulkan.iOS 15 | { 16 | unsafe public partial class IOSSurfaceCreateInfoMvk : MarshalledObject 17 | { 18 | public UInt32 Flags { 19 | get { return m->Flags; } 20 | set { m->Flags = value; } 21 | } 22 | 23 | public IntPtr View { 24 | get { return m->View; } 25 | set { m->View = value; } 26 | } 27 | internal iOS.Interop.IOSSurfaceCreateInfoMvk* m { 28 | 29 | get { 30 | return (iOS.Interop.IOSSurfaceCreateInfoMvk*)native.Handle; 31 | } 32 | } 33 | 34 | public IOSSurfaceCreateInfoMvk () 35 | { 36 | native = Vulkan.Interop.Structure.Allocate (typeof (iOS.Interop.IOSSurfaceCreateInfoMvk)); 37 | Initialize (); 38 | } 39 | 40 | internal IOSSurfaceCreateInfoMvk (NativePointer pointer) 41 | { 42 | native = pointer; 43 | Initialize (); 44 | } 45 | 46 | 47 | internal void Initialize () 48 | { 49 | m->SType = StructureType.IOSSurfaceCreateInfoMvk; 50 | } 51 | 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/Platforms/iOS/Vulkan.iOS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | 8.0.30703 7 | 2.0 8 | {1D44D14A-8A7A-4DD9-837D-E7F50EF2ADA6} 9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10 | Library 11 | Vulkan.iOS 12 | Resources 13 | Vulkan.iOS 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug 20 | DEBUG; 21 | prompt 22 | 4 23 | false 24 | true 25 | 26 | 27 | full 28 | true 29 | bin\Release 30 | prompt 31 | 4 32 | false 33 | true 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | {15253e36-ddde-4c0a-9a6e-7632bacc8f7c} 54 | Vulkan 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/Vulkan/Interop/Helpers.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace Vulkan.Interop 5 | { 6 | internal class Structure 7 | { 8 | internal static Vulkan.NativePointer Allocate (Type type) 9 | { 10 | return new NativePointer (new NativeReference (Marshal.SizeOf (type), true)); 11 | } 12 | 13 | unsafe internal static void MarshalFixedSizeString (byte* dst, string src, int size) 14 | { 15 | var bytes = System.Text.UTF8Encoding.UTF8.GetBytes (src); 16 | size = Math.Min (size - 1, bytes.Length); 17 | int i; 18 | for (i = 0; i < size; i++) 19 | dst [i] = bytes[i]; 20 | dst [i] = 0; 21 | } 22 | 23 | internal static object MarshalPointerToObject (IntPtr ptr, Type type) 24 | { 25 | if (ptr == IntPtr.Zero) 26 | return null; 27 | 28 | return Marshal.PtrToStructure (ptr, type); 29 | } 30 | 31 | internal static IntPtr MarshalObjectToPointer (IntPtr ptr, object value) 32 | { 33 | if (value == null) { 34 | if (ptr != IntPtr.Zero) 35 | Marshal.FreeHGlobal (ptr); 36 | return IntPtr.Zero; 37 | } else { 38 | if (ptr == IntPtr.Zero) 39 | ptr = Marshal.AllocHGlobal (Marshal.SizeOf (value)); 40 | Marshal.StructureToPtr (value, ptr, false); 41 | } 42 | 43 | return ptr; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Vulkan/Interop/MarshalUnions.cs: -------------------------------------------------------------------------------- 1 | /* Please note that this file is generated by the VulkanSharp's generator. Do not edit directly. 2 | 3 | Licensed under the MIT license. 4 | 5 | Copyright 2016 Xamarin Inc 6 | 7 | This notice may not be removed from any source distribution. 8 | See LICENSE file for licensing details. 9 | */ 10 | 11 | using System; 12 | using System.Runtime.InteropServices; 13 | 14 | namespace Vulkan.Interop 15 | { 16 | [StructLayout (LayoutKind.Explicit)] 17 | internal partial struct ClearColorValue 18 | { 19 | [FieldOffset (0)] internal unsafe fixed float Float32[4]; 20 | [FieldOffset (0)] internal unsafe fixed Int32 Int32[4]; 21 | [FieldOffset (0)] internal unsafe fixed UInt32 Uint32[4]; 22 | } 23 | 24 | [StructLayout (LayoutKind.Explicit)] 25 | internal partial struct ClearValue 26 | { 27 | [FieldOffset (0)] internal ClearColorValue Color; 28 | [FieldOffset (0)] internal ClearDepthStencilValue DepthStencil; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Vulkan/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("Vulkan")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("Vulkan")] 12 | [assembly: AssemblyCopyright ("Copyright (c) Xamarin Inc")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("0.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | -------------------------------------------------------------------------------- /src/Vulkan/Properties/AssemblyVisibility.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("Vulkan.Android")] 4 | [assembly: InternalsVisibleTo("Vulkan.Windows")] 5 | [assembly: InternalsVisibleTo("Vulkan.iOS")] 6 | -------------------------------------------------------------------------------- /src/Vulkan/Vulkan.dll.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/NativeMemory/Assets/AboutAssets.txt: -------------------------------------------------------------------------------- 1 | Any raw assets you want to be deployed with your application can be placed in 2 | this directory (and child directories) and given a Build Action of "AndroidAsset". 3 | 4 | These files will be deployed with your package and will be accessible using Android's 5 | AssetManager, like this: 6 | 7 | public class ReadAsset : Activity 8 | { 9 | protected override void OnCreate (Bundle bundle) 10 | { 11 | base.OnCreate (bundle); 12 | 13 | InputStream input = Assets.Open ("my_asset.txt"); 14 | } 15 | } 16 | 17 | Additionally, some Android functions will automatically load asset files: 18 | 19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); 20 | -------------------------------------------------------------------------------- /tests/NativeMemory/MainActivity.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | using Android.App; 4 | using Android.OS; 5 | using Xamarin.Android.NUnitLite; 6 | 7 | namespace NativeMemory 8 | { 9 | [Activity (Label = "NativeMemory", MainLauncher = true, Name = "mono.vulkansharp.tests.NativeMemory")] 10 | public class MainActivity : TestSuiteActivity 11 | { 12 | protected override void OnCreate (Bundle bundle) 13 | { 14 | // tests can be inside the main assembly 15 | AddTest (Assembly.GetExecutingAssembly ()); 16 | // or in any reference assemblies 17 | // AddTest (typeof (Your.Library.TestClass).Assembly); 18 | 19 | // Once you called base.OnCreate(), you cannot add more assemblies. 20 | base.OnCreate (bundle); 21 | } 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /tests/NativeMemory/Makefile: -------------------------------------------------------------------------------- 1 | MSBUILD=msbuild 2 | PACKAGE=NativeMemory 3 | 4 | define run-msbuild 5 | $(MSBUILD) $(PACKAGE).csproj /v:d $(if $(1),/t:$(1)) 6 | endef 7 | 8 | APK = bin/Debug/$(PACKAGE)-Signed.apk 9 | 10 | all:: $(APK) 11 | 12 | clean:: 13 | -$(RM) -rf obj bin 14 | 15 | $(APK) : Makefile $(PACKAGE).csproj $(wildcard */*.cs *.cs) 16 | $(call run-msbuild,,$(INSTALL_EXTRA)) 17 | 18 | deploy:: $(APK) 19 | $(call run-msbuild,Install,$(INSTALL_EXTRA)) 20 | 21 | undeploy:: $(APK) 22 | $(call run-msbuild,Uninstall,$(UNINSTALL_EXTRA)) 23 | 24 | run:: 25 | $(call run-msbuild,RunTests,$(RUNTESTS_EXTRA)) 26 | -------------------------------------------------------------------------------- /tests/NativeMemory/Properties/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/NativeMemory/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using Android.App; 4 | 5 | // Information about this assembly is defined by the following attributes. 6 | // Change them to the values specific to your project. 7 | 8 | [assembly: AssemblyTitle ("NativeMemory")] 9 | [assembly: AssemblyDescription ("")] 10 | [assembly: AssemblyConfiguration ("")] 11 | [assembly: AssemblyCompany ("")] 12 | [assembly: AssemblyProduct ("")] 13 | [assembly: AssemblyCopyright ("rodo")] 14 | [assembly: AssemblyTrademark ("")] 15 | [assembly: AssemblyCulture ("")] 16 | 17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 20 | 21 | [assembly: AssemblyVersion ("1.0.0")] 22 | 23 | // The following attributes are used to specify the signing key for the assembly, 24 | // if desired. See the Mono documentation for more information about signing. 25 | 26 | //[assembly: AssemblyDelaySign(false)] 27 | //[assembly: AssemblyKeyFile("")] 28 | 29 | -------------------------------------------------------------------------------- /tests/NativeMemory/Resources/AboutResources.txt: -------------------------------------------------------------------------------- 1 | Images, layout descriptions, binary blobs and string dictionaries can be included 2 | in your application as resource files. Various Android APIs are designed to 3 | operate on the resource IDs instead of dealing with images, strings or binary blobs 4 | directly. 5 | 6 | For example, a sample Android app that contains a user interface layout (main.axml), 7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) 8 | would keep its resources in the "Resources" directory of the application: 9 | 10 | Resources/ 11 | drawable/ 12 | icon.png 13 | 14 | layout/ 15 | main.axml 16 | 17 | values/ 18 | strings.xml 19 | 20 | In order to get the build system to recognize Android resources, set the build action to 21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but 22 | instead operate on resource IDs. When you compile an Android application that uses resources, 23 | the build system will package the resources for distribution and generate a class called "R" 24 | (this is an Android convention) that contains the tokens for each one of the resources 25 | included. For example, for the above Resources layout, this is what the R class would expose: 26 | 27 | public class R { 28 | public class drawable { 29 | public const int icon = 0x123; 30 | } 31 | 32 | public class layout { 33 | public const int main = 0x456; 34 | } 35 | 36 | public class strings { 37 | public const int first_string = 0xabc; 38 | public const int second_string = 0xbcd; 39 | } 40 | } 41 | 42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main 43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first 44 | string in the dictionary file values/strings.xml. 45 | -------------------------------------------------------------------------------- /tests/NativeMemory/Resources/mipmap-hdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/tests/NativeMemory/Resources/mipmap-hdpi/Icon.png -------------------------------------------------------------------------------- /tests/NativeMemory/Resources/mipmap-mdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/tests/NativeMemory/Resources/mipmap-mdpi/Icon.png -------------------------------------------------------------------------------- /tests/NativeMemory/Resources/mipmap-xhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/tests/NativeMemory/Resources/mipmap-xhdpi/Icon.png -------------------------------------------------------------------------------- /tests/NativeMemory/Resources/mipmap-xxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/tests/NativeMemory/Resources/mipmap-xxhdpi/Icon.png -------------------------------------------------------------------------------- /tests/NativeMemory/Resources/mipmap-xxxhdpi/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mono/VulkanSharp/68b1052dbe944547176bfe8b89fca72f047e5515/tests/NativeMemory/Resources/mipmap-xxxhdpi/Icon.png -------------------------------------------------------------------------------- /tests/NativeMemory/TestInstrumentation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | using Android.App; 5 | using Android.Runtime; 6 | 7 | using Xamarin.Android.NUnitLite; 8 | 9 | namespace mono.vulkansharp.tests.NativeMemory { 10 | 11 | [Instrumentation (Name="mono.vulkansharp.tests.TestInstrumentation")] 12 | public class TestInstrumentation : TestSuiteInstrumentation { 13 | 14 | public TestInstrumentation (IntPtr handle, JniHandleOwnership transfer) 15 | : base (handle, transfer) 16 | { 17 | } 18 | 19 | protected override void AddTests () 20 | { 21 | AddTest (Assembly.GetExecutingAssembly ()); 22 | } 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /tests/NativeMemory/TestsSample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using NUnit.Framework; 3 | using Vulkan; 4 | 5 | namespace NativeMemory 6 | { 7 | [TestFixture] 8 | public class TestsSample 9 | { 10 | 11 | [SetUp] 12 | public void Setup () 13 | { 14 | NativeMemoryDebug.ReportCallback = Console.WriteLine; 15 | // uncomment for more vebose output 16 | // NativeMemoryDebug.StackTrace = () => new System.Diagnostics.StackTrace ().ToString (); 17 | NativeMemoryDebug.Enabled = true; 18 | } 19 | 20 | 21 | [TearDown] 22 | public void Tear () { } 23 | 24 | [Test] 25 | public void NativeMemory () 26 | { 27 | Console.WriteLine ("create instance and query devices"); 28 | 29 | var instance = new Instance (); 30 | if (instance == null) 31 | Assert.Fail ("unable to create Vulkan instance"); 32 | var devices = instance.EnumeratePhysicalDevices (); 33 | if (devices.Length < 1) 34 | Assert.Fail ("this test needs device with at least one Vulkan physical device"); 35 | 36 | Console.WriteLine ("enumerated {0} devices, allocated size {1}", devices.Length, NativeMemoryDebug.AllocatedSize); 37 | foreach (var device in devices) 38 | Console.WriteLine ("device: {0}", device.GetProperties ().DeviceName); 39 | 40 | Console.WriteLine ("before forced GC, allocated size {0}", NativeMemoryDebug.AllocatedSize); 41 | 42 | GC.Collect (); 43 | GC.WaitForPendingFinalizers (); 44 | Console.WriteLine ("after forced GC, allocated size {0}", NativeMemoryDebug.AllocatedSize); 45 | 46 | Assert.False (NativeMemoryDebug.AllocatedSize > 0); 47 | 48 | instance.Dispose (); 49 | instance = null; 50 | 51 | GC.Collect (); 52 | GC.WaitForPendingFinalizers (); 53 | Console.WriteLine ("after Instance disposed, allocated size {0}", NativeMemoryDebug.AllocatedSize); 54 | } 55 | 56 | [Test] 57 | public void CommandsNativeMemory () 58 | { 59 | Console.WriteLine ("query layers and extensions info"); 60 | var layerProps = Commands.EnumerateInstanceLayerProperties (); 61 | Console.WriteLine ("after layers info created, allocated size {0}", NativeMemoryDebug.AllocatedSize); 62 | var extProps = Commands.EnumerateInstanceExtensionProperties (); 63 | Console.WriteLine ("after extensions info created, allocated size {0}", NativeMemoryDebug.AllocatedSize); 64 | layerProps = null; 65 | extProps = null; 66 | Console.WriteLine ("after info dropped, allocated size {0}", NativeMemoryDebug.AllocatedSize); 67 | GC.Collect (); 68 | GC.WaitForPendingFinalizers (); 69 | Console.WriteLine ("after GC and finalizers, allocated size {0}", NativeMemoryDebug.AllocatedSize); 70 | Assert.False (NativeMemoryDebug.AllocatedSize > 0); 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /tools/DocMerge/DocMerge.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {3D13E652-5F08-41E0-ABB6-8802249DCB96} 7 | Exe 8 | DocMerge 9 | DocMerge 10 | v4.5 11 | 12 | 13 | true 14 | full 15 | false 16 | bin\Debug 17 | DEBUG; 18 | prompt 19 | 4 20 | true 21 | 22 | 23 | true 24 | bin\Release 25 | prompt 26 | 4 27 | true 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | GeneratorBase.cs 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /tools/DocMerge/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace VulkanSharp.DocMerge 4 | { 5 | class MainClass 6 | { 7 | public static void Main (string [] args) 8 | { 9 | var injector = new Injector (); 10 | injector.UpdateDocXml (); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tools/DocMerge/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("DocMerge")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("rodo")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /tools/Generator/Generator.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {09F60593-810A-491C-84FB-A9848A182E6D} 7 | Exe 8 | VulkanSharp.Generator 9 | Generator 10 | v4.5 11 | 12 | 13 | true 14 | full 15 | false 16 | ..\..\bin\Debug 17 | DEBUG; 18 | prompt 19 | 4 20 | false 21 | 22 | 23 | full 24 | true 25 | ..\..\bin\Release 26 | prompt 27 | 4 28 | false 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /tools/Generator/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace VulkanSharp.Generator 5 | { 6 | public class MainClass 7 | { 8 | static public int Main (string[] args) 9 | { 10 | var srcFile = "vk.xml"; 11 | var destDir = "Vulkan"; 12 | if (args.Length > 0) 13 | srcFile = args [0]; 14 | if (args.Length > 1) 15 | destDir = args [1]; 16 | 17 | Directory.CreateDirectory (destDir); 18 | 19 | Generator gen = new Generator (srcFile, destDir); 20 | 21 | gen.Run (); 22 | 23 | return 0; 24 | } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /tools/Generator/NOTES.txt: -------------------------------------------------------------------------------- 1 | VkFlags 2 | category:bitmasks without flags enum are UInt32 now, might be helper translating class (like alias) [TODO] 3 | 4 | extensions 5 | finish extensions binding, generate more platform specific extensions 6 | 7 | TODO: 8 | optional parameters (like AllocationCallbacks) - set default values for method parameters 9 | 10 | ideas: 11 | add simplified properties to structures/unions for array properties to be able to assign 12 | only one element. an example: 13 | 14 | var createBufferInfo = new BufferCreateInfo { 15 | Size = size, 16 | Usage = usageFlags, 17 | SharingMode = SharingMode.Exclusive, 18 | QueueFamilyIndices = new uint [] { 0 } 19 | }; 20 | 21 | so if add property QueueFamilyIndex we can simplify the code to 22 | 23 | var createBufferInfo = new BufferCreateInfo { 24 | Size = size, 25 | Usage = usageFlags, 26 | SharingMode = SharingMode.Exclusive, 27 | QueueFamilyIndex = 0 28 | }; 29 | 30 | under the hood we will set the counter to 1 and have one element array of indices 31 | --------------------------------------------------------------------------------