mirror of
https://github.com/amerkoleci/Vortice.Win32.git
synced 2026-01-14 16:16:04 +08:00
Massive folder rename, follow Apis convention, separate Imaging (WIC)
This commit is contained in:
18
src/Vortice.Win32.Graphics.Direct3D11/ID3D11Texture3D.cs
Normal file
18
src/Vortice.Win32.Graphics.Direct3D11/ID3D11Texture3D.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
// Copyright © Amer Koleci and Contributors.
|
||||
// Licensed under the MIT License (MIT). See LICENSE in the repository root for more information.
|
||||
|
||||
using static Win32.Graphics.Direct3D11.Apis;
|
||||
|
||||
namespace Win32.Graphics.Direct3D11;
|
||||
|
||||
public unsafe partial struct ID3D11Texture3D
|
||||
{
|
||||
public uint CalculateSubResourceIndex(uint mipSlice, uint arraySlice, out uint mipSize)
|
||||
{
|
||||
Texture3DDescription desc;
|
||||
GetDesc(&desc);
|
||||
|
||||
mipSize = D3D11CalculateMipSize(mipSlice, desc.Depth);
|
||||
return D3D11CalcSubresource(mipSlice, arraySlice, desc.MipLevels);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user