Пример #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);