diff --git a/src/Refresh.cs b/src/Refresh.cs index b748e4a..a5cf10e 100644 --- a/src/Refresh.cs +++ b/src/Refresh.cs @@ -490,6 +490,19 @@ namespace RefreshCS public IntPtr byteCode; } + [StructLayout(LayoutKind.Sequential)] + public struct TextureCreateInfo + { + uint width; + uint height; + uint depth; + byte isCube; + SampleCount sampleCount; + uint levelCount; + ColorFormat format; + uint usageFlags; /* Refresh_TextureUsageFlags */ + } + [StructLayout(LayoutKind.Sequential)] public struct ShaderStageState { @@ -706,33 +719,9 @@ namespace RefreshCS ); [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr Refresh_CreateTexture2D( + public static extern IntPtr Refresh_CreateTexture( IntPtr device, - ColorFormat format, - uint width, - uint height, - uint levelCount, - uint usageFlags /* TextureUsageFlagBits */ - ); - - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr Refresh_CreateTexture3D( - IntPtr device, - ColorFormat format, - uint width, - uint height, - uint depth, - uint levelCount, - uint usageFlags /* TextureUsageFlagBits */ - ); - - [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr Refresh_CreateTextureCube( - IntPtr device, - ColorFormat format, - uint size, - uint levelCount, - uint usageFlags /* TextureUsageFlagBits */ + ref TextureCreateInfo textureCreateInfo ); [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]