コード例 #1
0
ファイル: TextureLoader.cs プロジェクト: dotprodukt/dx11-vvvv
        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");
            }
        }
コード例 #2
0
ファイル: TextureLoader.cs プロジェクト: dotprodukt/dx11-vvvv
        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");
            }
        }
コード例 #3
0
ファイル: TextureLoader.cs プロジェクト: vsnchips/dx11-vvvv
        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");
            }
        }
コード例 #4
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
        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");
            }
        }
コード例 #5
0
ファイル: TextureLoader.cs プロジェクト: msruzy/FeralTic-SDX
        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");
            }
        }
コード例 #6
0
ファイル: TextureLoader.cs プロジェクト: vsnchips/dx11-vvvv
        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");
            }
        }