當前位置: 首頁>>代碼示例>>C#>>正文


C# Direct3D9.PaletteEntry類代碼示例

本文整理匯總了C#中SharpDX.Direct3D9.PaletteEntry的典型用法代碼示例。如果您正苦於以下問題:C# PaletteEntry類的具體用法?C# PaletteEntry怎麽用?C# PaletteEntry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PaletteEntry類屬於SharpDX.Direct3D9命名空間,在下文中一共展示了PaletteEntry類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CreateFromMemory

 /// <summary>
 /// Creates a <see cref="CubeTexture"/> from a stream.
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="buffer">The buffer.</param>
 /// <param name="size">The size.</param>
 /// <param name="levelCount">The level count.</param>
 /// <param name="usage">The usage.</param>
 /// <param name="format">The format.</param>
 /// <param name="pool">The pool.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="mipFilter">The mip filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <param name="palette">The palette.</param>
 /// <returns>
 /// A <see cref="CubeTexture"/>
 /// </returns>
 /// <unmanaged>HRESULT D3DXCreateCubeTextureFromFileInMemoryEx([In] IDirect3DDevice9* pDevice,[In] const void* pSrcData,[In] unsigned int SrcDataSize,[In] unsigned int Size,[In] unsigned int MipLevels,[In] unsigned int Usage,[In] D3DFORMAT Format,[In] D3DPOOL Pool,[In] unsigned int Filter,[In] unsigned int MipFilter,[In] D3DCOLOR ColorKey,[Out] D3DXIMAGE_INFO* pSrcInfo,[Out, Buffer] PALETTEENTRY* pPalette,[In] IDirect3DCubeTexture9** ppCubeTexture)</unmanaged>
 private static unsafe CubeTexture CreateFromMemory(Device device, byte[] buffer, int size, int levelCount, Usage usage, Format format, Pool pool, Filter filter, Filter mipFilter, int colorKey, IntPtr imageInformation, PaletteEntry[] palette)
 {
     CubeTexture cubeTexture;
     fixed (void* pBuffer = buffer)
         cubeTexture = CreateFromPointer(
             device,
             (IntPtr)pBuffer,
             buffer.Length,
             size,
             levelCount,
             usage,
             format,
             pool,
             filter,
             mipFilter,
             colorKey,
             imageInformation,
             palette
             );
     return cubeTexture;
 }
開發者ID:Ziriax,項目名稱:SharpDX,代碼行數:40,代碼來源:CubeTexture.cs

示例2: CreateFromStream

 /// <summary>
 /// Creates a <see cref="CubeTexture"/> from a stream.
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="stream">The stream.</param>
 /// <param name="sizeBytes">The size bytes.</param>
 /// <param name="size">The size.</param>
 /// <param name="levelCount">The level count.</param>
 /// <param name="usage">The usage.</param>
 /// <param name="format">The format.</param>
 /// <param name="pool">The pool.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="mipFilter">The mip filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <param name="palette">The palette.</param>
 /// <returns>A <see cref="CubeTexture"/></returns>
 /// <unmanaged>HRESULT D3DXCreateCubeTextureFromFileInMemoryEx([In] IDirect3DDevice9* pDevice,[In] const void* pSrcData,[In] unsigned int SrcDataSize,[In] unsigned int Size,[In] unsigned int MipLevels,[In] unsigned int Usage,[In] D3DFORMAT Format,[In] D3DPOOL Pool,[In] unsigned int Filter,[In] unsigned int MipFilter,[In] D3DCOLOR ColorKey,[Out] D3DXIMAGE_INFO* pSrcInfo,[Out, Buffer] PALETTEENTRY* pPalette,[In] IDirect3DCubeTexture9** ppCubeTexture)</unmanaged>
 private static unsafe CubeTexture CreateFromStream(Device device, Stream stream, int sizeBytes, int size, int levelCount, Usage usage, Format format, Pool pool, Filter filter, Filter mipFilter, int colorKey, IntPtr imageInformation, PaletteEntry[] palette)
 {
     CubeTexture cubeTexture;
     sizeBytes = sizeBytes == 0 ? (int)(stream.Length - stream.Position) : sizeBytes;
     if (stream is DataStream)
     {
         cubeTexture = CreateFromPointer(
             device,
             ((DataStream)stream).PositionPointer,
             sizeBytes,
             size,
             levelCount,
             usage,
             format,
             pool,
             filter,
             mipFilter,
             colorKey,
             imageInformation,
             palette
             );
     }
     else
     {
         var data = Utilities.ReadStream(stream);
         fixed (void* pData = data)
             cubeTexture = CreateFromPointer(
                 device,
                 (IntPtr)pData,
                 data.Length,
                 size,
                 levelCount,
                 usage,
                 format,
                 pool,
                 filter,
                 mipFilter,
                 colorKey,
                 imageInformation,
                 palette
                 );
     }
     stream.Position = sizeBytes;
     return cubeTexture;
 }
開發者ID:Ziriax,項目名稱:SharpDX,代碼行數:63,代碼來源:CubeTexture.cs

示例3: ToStream

 /// <summary>
 /// Saves a volume to a <see cref="DataStream"/>. 
 /// </summary>
 /// <param name="volume">The volume.</param>
 /// <param name="format">The format.</param>
 /// <param name="box">The box.</param>
 /// <param name="palette">The palette.</param>
 /// <returns>A <see cref="SharpDX.Result" /> object describing the result of the operation.</returns>
 /// <unmanaged>HRESULT D3DXSaveVolumeToFileInMemory([In] ID3DXBuffer** ppDestBuf,[In] D3DXIMAGE_FILEFORMAT DestFormat,[In] IDirect3DVolume9* pSrcVolume,[In, Buffer] const PALETTEENTRY* pSrcPalette,[In] const void* pSrcBox)</unmanaged>
 public static DataStream ToStream(Volume volume, ImageFileFormat format, Box box, PaletteEntry[] palette)
 {
     unsafe
     {
         Blob blob;
         D3DX9.SaveVolumeToFileInMemory(out blob, format, volume, palette, new IntPtr(&box));
         return new DataStream(blob);
     }
 }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:18,代碼來源:Volume.cs

示例4: FromStream

 /// <summary>
 /// Creates a <see cref="CubeTexture"/> from a stream.
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="stream">The stream.</param>
 /// <param name="sizeBytes">The size bytes.</param>
 /// <param name="size">The size.</param>
 /// <param name="levelCount">The level count.</param>
 /// <param name="usage">The usage.</param>
 /// <param name="format">The format.</param>
 /// <param name="pool">The pool.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="mipFilter">The mip filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <param name="palette">The palette.</param>
 /// <returns>
 /// A <see cref="CubeTexture"/>
 /// </returns>
 /// <unmanaged>HRESULT D3DXCreateCubeTextureFromFileInMemoryEx([In] IDirect3DDevice9* pDevice,[In] const void* pSrcData,[In] unsigned int SrcDataSize,[In] unsigned int Size,[In] unsigned int MipLevels,[In] unsigned int Usage,[In] D3DFORMAT Format,[In] D3DPOOL Pool,[In] unsigned int Filter,[In] unsigned int MipFilter,[In] D3DCOLOR ColorKey,[Out] D3DXIMAGE_INFO* pSrcInfo,[Out, Buffer] PALETTEENTRY* pPalette,[In] IDirect3DCubeTexture9** ppCubeTexture)</unmanaged>
 public static unsafe CubeTexture FromStream(Device device, Stream stream, int sizeBytes, int size, int levelCount, Usage usage, Format format, Pool pool, Filter filter, Filter mipFilter, int colorKey, out ImageInformation imageInformation, out PaletteEntry[] palette)
 {
     palette = new PaletteEntry[256];
     fixed (void* pImageInfo = &imageInformation)
         return CreateFromStream(device, stream, sizeBytes, size, levelCount, usage, format, pool, filter, mipFilter, colorKey, (IntPtr)pImageInfo, palette);
 }
開發者ID:Ziriax,項目名稱:SharpDX,代碼行數:26,代碼來源:CubeTexture.cs

示例5: FromVolume

 /// <summary>
 /// Loads a volume from a source volume.
 /// </summary>
 /// <param name="destinationVolume">The destination volume.</param>
 /// <param name="sourceVolume">The source volume.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="sourceBox">The source box.</param>
 /// <param name="destinationBox">The destination box.</param>
 /// <param name="destinationPalette">The destination palette.</param>
 /// <param name="sourcePalette">The source palette.</param>
 /// <returns>A <see cref="SharpDX.Result" /> object describing the result of the operation.</returns>
 /// <unmanaged>HRESULT D3DXLoadVolumeFromVolume([In] IDirect3DVolume9* pDestVolume,[In] const PALETTEENTRY* pDestPalette,[In] const D3DBOX* pDestBox,[In] IDirect3DVolume9* pSrcVolume,[In] const PALETTEENTRY* pSrcPalette,[In] const D3DBOX* pSrcBox,[In] unsigned int Filter,[In] D3DCOLOR ColorKey)</unmanaged>
 public static void FromVolume(Volume destinationVolume, Volume sourceVolume, Filter filter, int colorKey, Box sourceBox, Box destinationBox, PaletteEntry[] destinationPalette, PaletteEntry[] sourcePalette)
 {
     unsafe
     {
         D3DX9.LoadVolumeFromVolume(destinationVolume, destinationPalette, new IntPtr(&destinationBox), sourceVolume, sourcePalette, new IntPtr(&sourceBox), filter, colorKey);
     }
 }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:20,代碼來源:Volume.cs

示例6: ToFile

 /// <summary>
 /// Saves a volume to a file on disk.
 /// </summary>
 /// <param name="volume">The volume.</param>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="format">The format.</param>
 /// <param name="box">The box.</param>
 /// <param name="palette">The palette.</param>
 /// <returns>A <see cref="SharpDX.Result" /> object describing the result of the operation.</returns>
 /// <unmanaged>HRESULT D3DXSaveVolumeToFileW([In] const wchar_t* pDestFile,[In] D3DXIMAGE_FILEFORMAT DestFormat,[In] IDirect3DVolume9* pSrcVolume,[In] const PALETTEENTRY* pSrcPalette,[In] const D3DBOX* pSrcBox)</unmanaged>
 public static void ToFile(Volume volume, string fileName, ImageFileFormat format, Box box, PaletteEntry[] palette)
 {
     unsafe
     {
         D3DX9.SaveVolumeToFileW(fileName, format, volume, palette, new IntPtr(&box));
     }
 }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:17,代碼來源:Volume.cs

示例7: FromFileInStream

 /// <summary>
 /// Loads a volume from a file in a strean.
 /// </summary>
 /// <param name="volume">The volume.</param>
 /// <param name="stream">The stream.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="sourceBox">The source box.</param>
 /// <param name="destinationBox">The destination box.</param>
 /// <param name="palette">The palette.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <returns>A <see cref="SharpDX.Result" /> object describing the result of the operation.</returns>
 /// <unmanaged>HRESULT D3DXLoadVolumeFromFileInMemory([In] IDirect3DVolume9* pDestVolume,[Out, Buffer] const PALETTEENTRY* pDestPalette,[In] const void* pDestBox,[In] const void* pSrcData,[In] unsigned int SrcDataSize,[In] const void* pSrcBox,[In] D3DX_FILTER Filter,[In] int ColorKey,[In] void* pSrcInfo)</unmanaged>
 public static void FromFileInStream(Volume volume, Stream stream, Filter filter, int colorKey, Box sourceBox, Box destinationBox, PaletteEntry[] palette, out ImageInformation imageInformation)
 {
     unsafe
     {
         fixed (void* pImageInformation = &imageInformation)
             CreateFromFileInStream(volume, stream, filter, colorKey, new IntPtr(&sourceBox), new IntPtr(&destinationBox), palette, (IntPtr)pImageInformation);
     }
 }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:21,代碼來源:Volume.cs

示例8: CreateFromFile

 /// <summary>
 /// Creates a <see cref="Texture"/> from a stream.
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 /// <param name="levelCount">The level count.</param>
 /// <param name="usage">The usage.</param>
 /// <param name="format">The format.</param>
 /// <param name="pool">The pool.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="mipFilter">The mip filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <param name="palette">The palette.</param>
 /// <returns>
 /// A <see cref="Texture"/>
 /// </returns>
 /// <unmanaged>HRESULT D3DXCreateTextureFromFileInMemoryEx([In] IDirect3DDevice9* pDevice,[In] const void* pSrcData,[In] unsigned int SrcDataSize,[In] unsigned int Size,[In] unsigned int MipLevels,[In] unsigned int Usage,[In] D3DFORMAT Format,[In] D3DPOOL Pool,[In] unsigned int Filter,[In] unsigned int MipFilter,[In] D3DCOLOR ColorKey,[Out] D3DXIMAGE_INFO* pSrcInfo,[Out, Buffer] PALETTEENTRY* pPalette,[In] IDirect3DTexture9** ppTexture)</unmanaged>
 private static unsafe Texture CreateFromFile(Device device, string fileName, int width, int height, int levelCount, Usage usage, Format format, Pool pool, Filter filter, Filter mipFilter, int colorKey, IntPtr imageInformation, PaletteEntry[] palette)
 {
     Texture cubeTexture;
     D3DX9.CreateTextureFromFileExW(
         device,
         fileName,
         width,
         height,
         levelCount,
         (int)usage,
         format,
         pool,
         (int)filter,
         (int)mipFilter,
         *(RawColorBGRA*)&colorKey,
         imageInformation,
         palette,
         out cubeTexture);
     return cubeTexture;
 }
開發者ID:alexey-bez,項目名稱:SharpDX,代碼行數:40,代碼來源:Texture.cs

示例9: FromFile

 /// <summary>
 /// Loads a volume from a file on the disk.
 /// </summary>
 /// <param name="volume">The volume.</param>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="sourceBox">The source box.</param>
 /// <param name="destinationBox">The destination box.</param>
 /// <param name="palette">The palette.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <returns>
 /// A <see cref="SharpDX.Result"/> object describing the result of the operation.
 /// </returns>
 /// <unmanaged>HRESULT D3DXLoadVolumeFromFileW([In] IDirect3DVolume9* pDestVolume,[In] const PALETTEENTRY* pDestPalette,[In] const D3DBOX* pDestBox,[In] const wchar_t* pSrcFile,[In] const D3DBOX* pSrcBox,[In] unsigned int Filter,[In] D3DCOLOR ColorKey,[In] D3DXIMAGE_INFO* pSrcInfo)</unmanaged>
 public static void FromFile(Volume volume, string fileName, Filter filter, int colorKey, Box sourceBox, Box destinationBox, PaletteEntry[] palette, out ImageInformation imageInformation)
 {
     unsafe
     {
         fixed (void* pImageInformation = &imageInformation)
             D3DX9.LoadVolumeFromFileW(volume, palette, new IntPtr(&destinationBox), fileName, new IntPtr(&sourceBox), filter, colorKey, (IntPtr)pImageInformation);
     }
 }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:23,代碼來源:Volume.cs

示例10: FromFileInMemory

 /// <summary>
 /// Loads a volume from a file in memory.
 /// </summary>
 /// <param name="volume">The volume.</param>
 /// <param name="memory">The memory.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="sourceBox">The source box.</param>
 /// <param name="destinationBox">The destination box.</param>
 /// <param name="palette">The palette.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <returns>
 /// A <see cref="SharpDX.Result"/> object describing the result of the operation.
 /// </returns>
 /// <unmanaged>HRESULT D3DXLoadVolumeFromFileInMemory([In] IDirect3DVolume9* pDestVolume,[Out, Buffer] const PALETTEENTRY* pDestPalette,[In] const void* pDestBox,[In] const void* pSrcData,[In] unsigned int SrcDataSize,[In] const void* pSrcBox,[In] D3DX_FILTER Filter,[In] int ColorKey,[In] void* pSrcInfo)</unmanaged>
 public static void FromFileInMemory(Volume volume, byte[] memory, Filter filter, int colorKey, Box sourceBox, Box destinationBox, PaletteEntry[] palette, out ImageInformation imageInformation)
 {
     unsafe
     {
         fixed (void* pMemory = memory)
             fixed (void* pImageInformation = &imageInformation)
                 D3DX9.LoadVolumeFromFileInMemory(volume, palette, new IntPtr(&destinationBox), (IntPtr)pMemory, memory.Length, new IntPtr(&sourceBox), filter, colorKey, (IntPtr)pImageInformation);
     }
 }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:24,代碼來源:Volume.cs

示例11: FromMemory

 /// <summary>
 /// Creates a <see cref="VolumeTexture"/> from a memory buffer.
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="buffer">The buffer.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 /// <param name="depth">The depth.</param>
 /// <param name="levelCount">The level count.</param>
 /// <param name="usage">The usage.</param>
 /// <param name="format">The format.</param>
 /// <param name="pool">The pool.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="mipFilter">The mip filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <param name="palette">The palette.</param>
 /// <returns>
 /// A <see cref="VolumeTexture"/>
 /// </returns>
 /// <unmanaged>HRESULT D3DXCreateVolumeTextureFromFileInMemoryEx([In] IDirect3DDevice9* pDevice,[In] const void* pSrcData,[In] unsigned int SrcDataSize,[In] unsigned int Size,[In] unsigned int MipLevels,[In] unsigned int Usage,[In] D3DFORMAT Format,[In] D3DPOOL Pool,[In] unsigned int Filter,[In] unsigned int MipFilter,[In] D3DCOLOR ColorKey,[Out] D3DXIMAGE_INFO* pSrcInfo,[Out, Buffer] PALETTEENTRY* pPalette,[In] IDirect3DVolumeTexture9** ppVolumeTexture)</unmanaged>
 public static unsafe VolumeTexture FromMemory(Device device, byte[] buffer, int width, int height, int depth, int levelCount, Usage usage, Format format, Pool pool, Filter filter, Filter mipFilter, int colorKey, out ImageInformation imageInformation, out PaletteEntry[] palette)
 {
     palette = new PaletteEntry[256];
     fixed (void* pImageInfo = &imageInformation)
         return CreateFromMemory(device, buffer, width, height, depth, levelCount, usage, format, pool, filter, mipFilter, colorKey, (IntPtr)pImageInfo, palette);
 }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:27,代碼來源:VolumeTexture.cs

示例12: FromFile

 /// <summary>
 /// Creates a <see cref="Texture"/> from a file
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="filename">The filename.</param>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 /// <param name="levelCount">The level count.</param>
 /// <param name="usage">The usage.</param>
 /// <param name="format">The format.</param>
 /// <param name="pool">The pool.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="mipFilter">The mip filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <param name="palette">The palette.</param>
 /// <returns>
 /// A <see cref="Texture"/>
 /// </returns>
 /// <unmanaged>HRESULT D3DXCreateTextureFromFileExW([In] IDirect3DDevice9* pDevice,[In] const wchar_t* pSrcFile,[In] unsigned int Size,[In] unsigned int MipLevels,[In] unsigned int Usage,[In] D3DFORMAT Format,[In] D3DPOOL Pool,[In] unsigned int Filter,[In] unsigned int MipFilter,[In] D3DCOLOR ColorKey,[In] void* pSrcInfo,[Out, Buffer] PALETTEENTRY* pPalette,[In] IDirect3DTexture9** ppTexture)</unmanaged>
 public static unsafe Texture FromFile(Device device, string filename, int width, int height, int levelCount, Usage usage, Format format, Pool pool, Filter filter, Filter mipFilter, int colorKey, out ImageInformation imageInformation, out PaletteEntry[] palette)
 {
     palette = new PaletteEntry[256];
     fixed (void* pImageInfo = &imageInformation)
         return CreateFromFile(device, filename, width, height, levelCount, usage, format, pool, filter, mipFilter, colorKey, (IntPtr)pImageInfo, palette);
 }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:26,代碼來源:Texture.cs

示例13: ComputeNormalMap

 /// <summary>
 /// Computes the normal map.
 /// </summary>
 /// <param name="texture">The texture.</param>
 /// <param name="sourceTexture">The source texture.</param>
 /// <param name="palette">The palette.</param>
 /// <param name="flags">The flags.</param>
 /// <param name="channel">The channel.</param>
 /// <param name="amplitude">The amplitude.</param>
 /// <returns>A <see cref="SharpDX.Result" /> object describing the result of the operation.</returns>
 /// <unmanaged>HRESULT D3DXComputeNormalMap([In] IDirect3DTexture9* pTexture,[In] IDirect3DTexture9* pSrcTexture,[Out, Buffer] const PALETTEENTRY* pSrcPalette,[In] unsigned int Flags,[In] unsigned int Channel,[In] float Amplitude)</unmanaged>
 public static void ComputeNormalMap(Texture texture, Texture sourceTexture, PaletteEntry[] palette, NormalMapFlags flags, Channel channel, float amplitude)
 {
     D3DX9.ComputeNormalMap(texture, sourceTexture, palette, (int)flags, (int)channel, amplitude);
 }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:15,代碼來源:Texture.cs

示例14: CreateFromPointer

 /// <summary>
 /// Creates a <see cref="CubeTexture"/> from a stream.
 /// </summary>
 /// <param name="device">The device.</param>
 /// <param name="pointer">The pointer.</param>
 /// <param name="sizeInBytes">The size in bytes.</param>
 /// <param name="size">The size.</param>
 /// <param name="levelCount">The level count.</param>
 /// <param name="usage">The usage.</param>
 /// <param name="format">The format.</param>
 /// <param name="pool">The pool.</param>
 /// <param name="filter">The filter.</param>
 /// <param name="mipFilter">The mip filter.</param>
 /// <param name="colorKey">The color key.</param>
 /// <param name="imageInformation">The image information.</param>
 /// <param name="palette">The palette.</param>
 /// <returns>
 /// A <see cref="CubeTexture"/>
 /// </returns>
 /// <unmanaged>HRESULT D3DXCreateCubeTextureFromFileInMemoryEx([In] IDirect3DDevice9* pDevice,[In] const void* pSrcData,[In] unsigned int SrcDataSize,[In] unsigned int Size,[In] unsigned int MipLevels,[In] unsigned int Usage,[In] D3DFORMAT Format,[In] D3DPOOL Pool,[In] unsigned int Filter,[In] unsigned int MipFilter,[In] D3DCOLOR ColorKey,[Out] D3DXIMAGE_INFO* pSrcInfo,[Out, Buffer] PALETTEENTRY* pPalette,[In] IDirect3DCubeTexture9** ppCubeTexture)</unmanaged>
 private static unsafe CubeTexture CreateFromPointer(Device device, IntPtr pointer, int sizeInBytes, int size, int levelCount, Usage usage, Format format, Pool pool, Filter filter, Filter mipFilter, int colorKey, IntPtr imageInformation, PaletteEntry[] palette)
 {
     CubeTexture cubeTexture;
     D3DX9.CreateCubeTextureFromFileInMemoryEx(
         device,
         pointer,
         sizeInBytes,
         size,
         levelCount,
         (int)usage,
         format,
         pool,
         (int)filter,
         (int)mipFilter,
         (Color)colorKey,
         imageInformation,
         palette,
         out cubeTexture);
     return cubeTexture;
 }
開發者ID:Ziriax,項目名稱:SharpDX,代碼行數:40,代碼來源:CubeTexture.cs

示例15: CreateFromFileInStream

        private static void CreateFromFileInStream(Volume volume, Stream stream, Filter filter, int colorKey, IntPtr sourceBox, IntPtr destinationBox, PaletteEntry[] palette, IntPtr imageInformation)
        {

            unsafe
            {
                if (stream is DataStream)
                    D3DX9.LoadVolumeFromFileInMemory(volume, palette, destinationBox, ((DataStream)stream).DataPointer, (int)stream.Length, sourceBox, filter, colorKey, (IntPtr)imageInformation);
                var data = Utilities.ReadStream(stream);
                fixed (void* pData = data)
                    D3DX9.LoadVolumeFromFileInMemory(volume, palette, destinationBox, (IntPtr)pData, data.Length, sourceBox, filter, colorKey, (IntPtr)imageInformation);
            }
        }
開發者ID:rbwhitaker,項目名稱:SharpDX,代碼行數:12,代碼來源:Volume.cs


注:本文中的SharpDX.Direct3D9.PaletteEntry類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。