示例#1
0
        public DxtImage[] GetImages()
        {
            IntPtr imagesPtr = dxtGetImages(ptr);
            int    imagenb   = imageCount;

            DxtImage[] dxtImages = new DxtImage[imagenb];


            for (int i = 0; i < imagenb; ++i)
            {
                dxtImages[i] = (DxtImage)Marshal.PtrToStructure(imagesPtr + i * Marshal.SizeOf(dxtImages[0]), typeof(DxtImage));
            }

            return(dxtImages);
        }
示例#2
0
 public HRESULT InitializeFromImage(out DxtImage srcImage, bool allow1D = false)
 {
     return(Utilities.HandleHRESULT(dxtInitializeFromImage(ptr, out srcImage, allow1D)));
 }
示例#3
0
 public static HRESULT GenerateMipMaps3D(ref DxtImage baseImage, int depth, TEX_FILTER_FLAGS filter, int levels, ScratchImage mipChain)
 {
     return(HandleHRESULT(dxtGenerateMipMaps3D(ref baseImage, depth, filter, levels, mipChain.ptr)));
 }
示例#4
0
 private extern static uint dxtInitializeFromImage(IntPtr img, out DxtImage srcImage, bool allow1D);
示例#5
0
 public static HRESULT Decompress(ref DxtImage cImage, DXGI_FORMAT format, ScratchImage image)
 {
     return(HandleHRESULT(dxtDecompress(ref cImage, format, image.ptr)));
 }
示例#6
0
 public static HRESULT GenerateMipMaps(ref DxtImage baseImage, TEX_FILTER_FLAGS filter, int levels, ScratchImage mipChain, bool allow1D = false)
 {
     return(HandleHRESULT(dxtGenerateMipMaps(ref baseImage, filter, levels, mipChain.ptr, allow1D)));
 }
示例#7
0
 public static HRESULT Convert(ref DxtImage srcImage, DXGI_FORMAT format, TEX_FILTER_FLAGS filter, float threshold, ScratchImage cImage)
 {
     return(HandleHRESULT(dxtConvert(ref srcImage, format, filter, threshold, cImage.ptr)));
 }
示例#8
0
 public static HRESULT Compress(ref DxtImage srcImage, DXGI_FORMAT format, TEX_COMPRESS_FLAGS compress, float alphaRef, ScratchImage cImage)
 {
     return(HandleHRESULT(dxtCompress(ref srcImage, format, compress, alphaRef, cImage.ptr)));
 }
示例#9
0
 private extern static uint dxtGenerateMipMaps3D(ref DxtImage baseImage, int depth, TEX_FILTER_FLAGS filter, int levels, IntPtr mipChain);
示例#10
0
 public static HRESULT SaveToDDSFile(ref DxtImage dxtImage, DDS_FLAGS flags, string szFile)
 {
     return(HandleHRESULT(dxtSaveToDDSFile(ref dxtImage, flags, szFile)));
 }
示例#11
0
 private extern static uint dxtGenerateMipMaps(ref DxtImage baseImage, TEX_FILTER_FLAGS filter, int levels, IntPtr mipChain, bool allow1D);
示例#12
0
 private extern static uint dxtSaveToDDSFile(ref DxtImage dxtImage, DDS_FLAGS flags, string szFile);
示例#13
0
 private extern static uint dxtDecompress(ref DxtImage cImage, DXGI_FORMAT format, IntPtr image);
示例#14
0
 private extern static uint dxtCompress(ref DxtImage srcImage, DXGI_FORMAT format, TEX_COMPRESS_FLAGS compress, float alphaRef, IntPtr cImage);
示例#15
0
 private extern static uint dxtConvert(ref DxtImage srcImage, DXGI_FORMAT format, TEX_FILTER_FLAGS filter, float threshold, IntPtr cImage);