CreateTexture changes

pull/1/head
cosmonaut 2021-01-14 01:57:26 -08:00
parent c6fddad50a
commit 61a1983092
1 changed files with 15 additions and 26 deletions

View File

@ -490,6 +490,19 @@ namespace RefreshCS
public IntPtr byteCode; 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)] [StructLayout(LayoutKind.Sequential)]
public struct ShaderStageState public struct ShaderStageState
{ {
@ -706,33 +719,9 @@ namespace RefreshCS
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_CreateTexture2D( public static extern IntPtr Refresh_CreateTexture(
IntPtr device, IntPtr device,
ColorFormat format, ref TextureCreateInfo textureCreateInfo
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 */
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]