diff --git a/src/Generator/Program.cs b/src/Generator/Program.cs
index e3c24ac..1609164 100644
--- a/src/Generator/Program.cs
+++ b/src/Generator/Program.cs
@@ -857,6 +857,7 @@ public static class Program
{ "DXGI_DEBUG_RLO_FLAGS", "ReportLiveObjectFlags" },
// D3D11
+ { "D3D11_MAP", "MapMode" },
{ "D3D11_RLDO_FLAGS", "ReportLiveDeviceObjectFlags" },
{ "D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG", "CreateDeviceContextStateFlags" },
{ "D3D11_QUERY", "QueryType" },
@@ -961,6 +962,12 @@ public static class Program
{ "IDXGISwapChain3::Present::Flags", "DXGI_PRESENT" },
{ "IDXGISwapChain4::Present::Flags", "DXGI_PRESENT" },
+ { "IDXGISwapChain::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
+ { "IDXGISwapChain1::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
+ { "IDXGISwapChain2::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
+ { "IDXGISwapChain3::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
+ { "IDXGISwapChain4::ResizeBuffers::SwapChainFlags", "DXGI_SWAP_CHAIN_FLAG" },
+
// D3D11
{ "ID3D11DeviceContext::Map::MapFlags", "D3D11_MAP_FLAG" },
{ "ID3D11DeviceContext::ClearDepthStencilView::ClearFlags", "D3D11_CLEAR_FLAG" },
diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D11.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D11.cs
index 1647caf..ccfad21 100644
--- a/src/Vortice.Win32/Generated/Graphics/Direct3D11.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Direct3D11.cs
@@ -2684,7 +2684,7 @@ public enum ResourceMiscFlags : uint
///
/// D3D11_MAP
-public enum Map : int
+public enum MapMode : int
{
///
/// D3D11_MAP_READ
diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext.cs
index 90f6c38..09bb1e7 100644
--- a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext.cs
@@ -161,9 +161,9 @@ public unsafe partial struct ID3D11DeviceContext
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
- public HResult Map(ID3D11Resource* pResource, uint Subresource, Map MapType, MapFlags MapFlags, MappedSubresource* pMappedResource)
+ public HResult Map(ID3D11Resource* pResource, uint Subresource, MapMode MapType, MapFlags MapFlags, MappedSubresource* pMappedResource)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext1.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext1.cs
index d85915b..4c8c46b 100644
--- a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext1.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext1.cs
@@ -161,9 +161,9 @@ public unsafe partial struct ID3D11DeviceContext1
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
- public HResult Map(ID3D11Resource* pResource, uint Subresource, Map MapType, uint MapFlags, MappedSubresource* pMappedResource)
+ public HResult Map(ID3D11Resource* pResource, uint Subresource, MapMode MapType, uint MapFlags, MappedSubresource* pMappedResource)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext1*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext1*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext2.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext2.cs
index a055206..0c282c5 100644
--- a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext2.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext2.cs
@@ -161,9 +161,9 @@ public unsafe partial struct ID3D11DeviceContext2
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
- public HResult Map(ID3D11Resource* pResource, uint Subresource, Map MapType, uint MapFlags, MappedSubresource* pMappedResource)
+ public HResult Map(ID3D11Resource* pResource, uint Subresource, MapMode MapType, uint MapFlags, MappedSubresource* pMappedResource)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext2*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext2*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext3.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext3.cs
index 7425126..8c59aec 100644
--- a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext3.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext3.cs
@@ -161,9 +161,9 @@ public unsafe partial struct ID3D11DeviceContext3
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
- public HResult Map(ID3D11Resource* pResource, uint Subresource, Map MapType, uint MapFlags, MappedSubresource* pMappedResource)
+ public HResult Map(ID3D11Resource* pResource, uint Subresource, MapMode MapType, uint MapFlags, MappedSubresource* pMappedResource)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext3*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext3*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext4.cs b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext4.cs
index 5a08e64..5736fc6 100644
--- a/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext4.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Direct3D11/ID3D11DeviceContext4.cs
@@ -161,9 +161,9 @@ public unsafe partial struct ID3D11DeviceContext4
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(14)]
- public HResult Map(ID3D11Resource* pResource, uint Subresource, Map MapType, uint MapFlags, MappedSubresource* pMappedResource)
+ public HResult Map(ID3D11Resource* pResource, uint Subresource, MapMode MapType, uint MapFlags, MappedSubresource* pMappedResource)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext4*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID3D11DeviceContext4*)Unsafe.AsPointer(ref this), pResource, Subresource, MapType, MapFlags, pMappedResource);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain.cs b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain.cs
index cdb11b8..ab9bf73 100644
--- a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain.cs
@@ -153,9 +153,9 @@ public unsafe partial struct IDXGISwapChain
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)]
- public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, uint SwapChainFlags)
+ public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, SwapChainFlags SwapChainFlags)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain1.cs b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain1.cs
index eb06380..ce65730 100644
--- a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain1.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain1.cs
@@ -153,9 +153,9 @@ public unsafe partial struct IDXGISwapChain1
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)]
- public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, uint SwapChainFlags)
+ public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, SwapChainFlags SwapChainFlags)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain1*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain2.cs b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain2.cs
index 5b2e719..b37d253 100644
--- a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain2.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain2.cs
@@ -153,9 +153,9 @@ public unsafe partial struct IDXGISwapChain2
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)]
- public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, uint SwapChainFlags)
+ public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, SwapChainFlags SwapChainFlags)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain2*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain2*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain3.cs b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain3.cs
index b1da29a..a40d672 100644
--- a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain3.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain3.cs
@@ -153,9 +153,9 @@ public unsafe partial struct IDXGISwapChain3
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)]
- public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, uint SwapChainFlags)
+ public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, SwapChainFlags SwapChainFlags)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain3*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain4.cs b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain4.cs
index a6f5756..42a2656 100644
--- a/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain4.cs
+++ b/src/Vortice.Win32/Generated/Graphics/Dxgi/IDXGISwapChain4.cs
@@ -153,9 +153,9 @@ public unsafe partial struct IDXGISwapChain4
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(13)]
- public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, uint SwapChainFlags)
+ public HResult ResizeBuffers(uint BufferCount, uint Width, uint Height, Common.Format NewFormat, SwapChainFlags SwapChainFlags)
{
- return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain4*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
+ return ((delegate* unmanaged[Stdcall])(lpVtbl[13]))((IDXGISwapChain4*)Unsafe.AsPointer(ref this), BufferCount, Width, Height, NewFormat, SwapChainFlags);
}
///
diff --git a/src/Vortice.Win32/Generated/Graphics/Graphics.cs b/src/Vortice.Win32/Generated/Graphics/Graphics.cs
deleted file mode 100644
index 007a6e2..0000000
--- a/src/Vortice.Win32/Generated/Graphics/Graphics.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-
-namespace Win32.Graphics;
-
-public static partial class Apis
-{
-}
-
-#region Enums
-///
-/// D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE
-public enum AffineTransform2DInterpolationMode : uint
-{
- ///
- /// D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_NEAREST_NEIGHBOR
- NearestNeighbor = 0,
- ///
- /// D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_LINEAR
- Linear = 1,
- ///
- /// D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_CUBIC
- Cubic = 2,
- ///
- /// D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_MULTI_SAMPLE_LINEAR
- MultiSampleLinear = 3,
- ///
- /// D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_ANISOTROPIC
- Anisotropic = 4,
- ///
- /// D2D1_2DAFFINETRANSFORM_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC
- HighQualityCubic = 5,
-}
-#endregion Enums
-
diff --git a/src/Vortice.Win32/Graphics/Direct3D11/ID3D11Device.cs b/src/Vortice.Win32/Graphics/Direct3D11/ID3D11Device.cs
index b51dd68..53ac345 100644
--- a/src/Vortice.Win32/Graphics/Direct3D11/ID3D11Device.cs
+++ b/src/Vortice.Win32/Graphics/Direct3D11/ID3D11Device.cs
@@ -5,7 +5,7 @@ namespace Win32.Graphics.Direct3D11;
public unsafe partial struct ID3D11Device
{
- public ComPtr CreateBuffe(BufferDescription* description, SubresourceData* initialData = default)
+ public ComPtr CreateBuffer(BufferDescription* description, SubresourceData* initialData = default)
{
using ComPtr buffer = default;
CreateBuffer(description, initialData, buffer.GetAddressOf()).ThrowIfFailed();
@@ -245,4 +245,11 @@ public unsafe partial struct ID3D11Device
return texture.Move();
}
+
+ public ComPtr CreateDeferredContext()
+ {
+ using ComPtr deferredContext = default;
+ CreateDeferredContext(0u, deferredContext.GetAddressOf()).ThrowIfFailed();
+ return deferredContext.Move();
+ }
}
diff --git a/src/Vortice.Win32/Graphics/Direct3D11/ID3D11DeviceContext.cs b/src/Vortice.Win32/Graphics/Direct3D11/ID3D11DeviceContext.cs
index 30f4ab5..ee93e65 100644
--- a/src/Vortice.Win32/Graphics/Direct3D11/ID3D11DeviceContext.cs
+++ b/src/Vortice.Win32/Graphics/Direct3D11/ID3D11DeviceContext.cs
@@ -39,6 +39,11 @@ public unsafe partial struct ID3D11DeviceContext
OMSetBlendState(blendState, null, D3D11_DEFAULT_SAMPLE_MASK);
}
+ public void IASetVertexBuffer(int slot, ID3D11Buffer* buffer, uint stride, uint offset = 0)
+ {
+ IASetVertexBuffers((uint)slot, 1, buffer == null ? null : &buffer, &stride, &offset);
+ }
+
public void VSSetShader(ID3D11VertexShader* shader)
{
VSSetShader(shader, null, 0);
@@ -99,6 +104,67 @@ public unsafe partial struct ID3D11DeviceContext
CSSetConstantBuffers(slot, 1, constantBuffer != null ? &constantBuffer : null);
}
+ public void UnsetRenderTargets()
+ {
+ OMSetRenderTargets(0, null, null);
+ }
+
+ public void OMSetRenderTargets(ID3D11RenderTargetView* renderTargetView, ID3D11DepthStencilView* depthStencilView = null)
+ {
+ OMSetRenderTargets(1,
+ renderTargetView == null ? null : &renderTargetView,
+ depthStencilView);
+ }
+
+ public void ClearRenderTargetView(ID3D11RenderTargetView* renderTargetView, Color4 color)
+ {
+ ClearRenderTargetView(renderTargetView, (float*)&color);
+ }
+
+ public void ClearUnorderedAccessViewFloat(ID3D11UnorderedAccessView* unorderedAccessView, Color4 color)
+ {
+ ClearUnorderedAccessViewFloat(unorderedAccessView, (float*)&color);
+ }
+
+ public HResult Map(ID3D11Texture2D* resource,
+ uint mipSlice, uint arraySlice,
+ MapMode mode, MapFlags flags,
+ MappedSubresource* pMappedResource, out uint subresource, out uint mipSize)
+ {
+ subresource = resource->CalculateSubResourceIndex(mipSlice, arraySlice, out mipSize);
+ return Map((ID3D11Resource*)resource, subresource, mode, flags, pMappedResource);
+ }
+
+ public Span Map(ID3D11Texture2D* resource,
+ uint mipSlice, uint arraySlice,
+ MapMode mode = MapMode.Read, MapFlags flags = MapFlags.None) where T : unmanaged
+ {
+ uint subresource = resource->CalculateSubResourceIndex(mipSlice, arraySlice, out uint mipSize);
+ MappedSubresource mappedSubresource;
+ Map((ID3D11Resource*)resource, subresource, mode, flags, &mappedSubresource).ThrowIfFailed();
+
+ Span source = new(mappedSubresource.pData, (int)(mipSize * mappedSubresource.RowPitch));
+ return global::System.Runtime.InteropServices.MemoryMarshal.Cast(source);
+ }
+
+ public void Unmap(ID3D11Texture1D* resource, uint mipSlice, uint arraySlice)
+ {
+ uint subresource = resource->CalculateSubResourceIndex(mipSlice, arraySlice, out _);
+ Unmap((ID3D11Resource*)resource, subresource);
+ }
+
+ public void Unmap(ID3D11Texture2D* resource, uint mipSlice, uint arraySlice)
+ {
+ uint subresource = resource->CalculateSubResourceIndex(mipSlice, arraySlice, out _);
+ Unmap((ID3D11Resource*)resource, subresource);
+ }
+
+ public void Unmap(ID3D11Texture3D* resource, uint mipSlice, uint arraySlice)
+ {
+ uint subresource = resource->CalculateSubResourceIndex(mipSlice, arraySlice, out _);
+ Unmap((ID3D11Resource*)resource, subresource);
+ }
+
public ComPtr FinishCommandList(bool RestoreDeferredContextState = false)
{
using ComPtr commandList = default;
diff --git a/src/Vortice.Win32/Graphics/Direct3D12/StaticSamplerDescription.cs b/src/Vortice.Win32/Graphics/Direct3D12/StaticSamplerDescription.cs
index ea9e426..86326c3 100644
--- a/src/Vortice.Win32/Graphics/Direct3D12/StaticSamplerDescription.cs
+++ b/src/Vortice.Win32/Graphics/Direct3D12/StaticSamplerDescription.cs
@@ -38,9 +38,10 @@ public unsafe partial struct StaticSamplerDescription
/// Initializes a new instance of the struct.
///
/// Sampler description
- /// The shader visibility.
- /// The shader register.
- /// The register space.
+ /// The shader visibility
+ /// The shader register
+ /// The register space
+ /// The value
public StaticSamplerDescription(
in SamplerDescription samplerDescription,
ShaderVisibility shaderVisibility,
diff --git a/src/Vortice.Win32/Graphics/Dxgi/SwapChainDescription1.cs b/src/Vortice.Win32/Graphics/Dxgi/SwapChainDescription1.cs
new file mode 100644
index 0000000..dfb1f90
--- /dev/null
+++ b/src/Vortice.Win32/Graphics/Dxgi/SwapChainDescription1.cs
@@ -0,0 +1,63 @@
+// Copyright © Amer Koleci and Contributors.
+// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
+
+using Win32.Graphics.Dxgi.Common;
+
+namespace Win32.Graphics.Dxgi;
+
+public partial struct SwapChainDescription1
+{
+ ///
+ /// Create new instance of struct.
+ ///
+ ///
+ ///
+ /// A that describes the display format.
+ ///
+ /// Specifies whether the full-screen display mode or the swap-chain back buffer is stereo. TRUE if stereo; otherwise, FALSE.
+ /// If you specify stereo, you must also specify a flip-model swap chain (that is, a swap chain that has the value set in the SwapEffect member).
+ ///
+ ///
+ /// A value that describes the surface usage and CPU access options for the back buffer. The back buffer can be used for shader input or render-target output.
+ ///
+ ///
+ /// A value that describes the number of buffers in the swap chain. When you create a full-screen swap chain, you typically include the front buffer in this value.
+ ///
+ ///
+ /// A value that identifies resize behavior if the size of the back buffer is not equal to the target output.
+ ///
+ ///
+ /// A value that describes the presentation model that is used by the swap chain and options for handling the contents of the presentation buffer after presenting a surface.
+ /// You must specify the value when you call the method because this method supports only flip presentation model.
+ ///
+ ///
+ /// A value that identifies the transparency behavior of the swap-chain back buffer.
+ ///
+ ///
+ /// A combination of values that are combined by using a bitwise OR operation. The resulting value specifies options for swap-chain behavior.
+ ///
+ public SwapChainDescription1(
+ uint width,
+ uint height,
+ Format format = Format.B8G8R8A8Unorm,
+ bool stereo = false,
+ Usage bufferUsage = Usage.RenderTargetOutput,
+ uint bufferCount = 2,
+ Scaling scaling = Scaling.Stretch,
+ SwapEffect swapEffect = SwapEffect.FlipDiscard,
+ AlphaMode alphaMode = AlphaMode.Ignore,
+ SwapChainFlags flags = SwapChainFlags.None)
+ {
+ Width = width;
+ Height = height;
+ Format = format;
+ Stereo = stereo;
+ SampleDesc = SampleDescription.Default;
+ BufferUsage = bufferUsage;
+ BufferCount = bufferCount;
+ Scaling = scaling;
+ SwapEffect = swapEffect;
+ AlphaMode = alphaMode;
+ Flags = flags;
+ }
+}
diff --git a/src/Vortice.Win32/Vortice.Win32.csproj b/src/Vortice.Win32/Vortice.Win32.csproj
index 1e89fc9..58bc367 100644
--- a/src/Vortice.Win32/Vortice.Win32.csproj
+++ b/src/Vortice.Win32/Vortice.Win32.csproj
@@ -3,7 +3,7 @@
netstandard2.0;net6.0;net7.0
Windows API low level bindings.
- 1.6.5
+ 1.6.6
true
True