public static void SaveToMemoryCompressed(DX11RenderContext device, DX11Texture2D texture, DdsBlockType blockType, out IntPtr data, out int size, out IntPtr blob) { long retcode = NativeMethods.SaveCompressedTextureToMemory(device.Device.ComPointer, device.CurrentDeviceContext.ComPointer, texture.Resource.ComPointer, (int)blockType, out data, out size,out blob); if (retcode < 0) { throw new Exception("Failed to Save Texture"); } }
public static void SaveToFileCompressed(DX11RenderContext device, DX11Texture2D texture, string path, DdsBlockType blockType) { long retcode = NativeMethods.SaveCompressedTextureToFile(device.Device.ComPointer, device.CurrentDeviceContext.ComPointer, texture.Resource.ComPointer, path, (int)blockType); if (retcode < 0) { throw new Exception("Failed to Save Texture"); } }
SaveToMemoryCompressed(DX11RenderContext device, DX11Texture2D texture, DdsBlockType blockType, out IntPtr data, out int size, out IntPtr blob) { long retcode = NativeMethods.SaveCompressedTextureToMemory(device.Device.ComPointer, device.CurrentDeviceContext.ComPointer, texture.Resource.ComPointer, (int)blockType, out data, out size, out blob); if (retcode < 0) { throw new Exception("Failed to Save Texture"); } }
public static void SaveToMemoryCompressedNoHeader(RenderDevice device, RenderContext context, IDxTexture2D texture, DdsBlockType blockType, out IntPtr data, out int size, out IntPtr blob) { long retcode = NativeMethods.SaveCompressedTextureToMemoryNoHeader(device.Device.NativePointer, context.Context.NativePointer, texture.Texture.NativePointer, (int)blockType, out data, out size, out blob); if (retcode < 0) { throw new Exception("Failed to Save Texture"); } }
public static void SaveToFileCompressed(RenderDevice device, RenderContext context, DX11Texture2D texture, string path, DdsBlockType blockType) { long retcode = NativeMethods.SaveCompressedTextureToFile(device.Device.NativePointer, context.Context.NativePointer, texture.Texture.NativePointer, path, (int)blockType); if (retcode < 0) { throw new Exception("Failed to Save Texture"); } }