Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public HRESULT InitializeFromImage(out DxtImage srcImage, bool allow1D = false)
 {
     return(Utilities.HandleHRESULT(dxtInitializeFromImage(ptr, out srcImage, allow1D)));
 }
Exemplo n.º 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)));
 }
Exemplo n.º 4
0
 private extern static uint dxtInitializeFromImage(IntPtr img, out DxtImage srcImage, bool allow1D);
Exemplo n.º 5
0
 public static HRESULT Decompress(ref DxtImage cImage, DXGI_FORMAT format, ScratchImage image)
 {
     return(HandleHRESULT(dxtDecompress(ref cImage, format, image.ptr)));
 }
Exemplo n.º 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)));
 }
Exemplo n.º 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)));
 }
Exemplo n.º 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)));
 }
Exemplo n.º 9
0
 private extern static uint dxtGenerateMipMaps3D(ref DxtImage baseImage, int depth, TEX_FILTER_FLAGS filter, int levels, IntPtr mipChain);
Exemplo n.º 10
0
 public static HRESULT SaveToDDSFile(ref DxtImage dxtImage, DDS_FLAGS flags, string szFile)
 {
     return(HandleHRESULT(dxtSaveToDDSFile(ref dxtImage, flags, szFile)));
 }
Exemplo n.º 11
0
 private extern static uint dxtGenerateMipMaps(ref DxtImage baseImage, TEX_FILTER_FLAGS filter, int levels, IntPtr mipChain, bool allow1D);
Exemplo n.º 12
0
 private extern static uint dxtSaveToDDSFile(ref DxtImage dxtImage, DDS_FLAGS flags, string szFile);
Exemplo n.º 13
0
 private extern static uint dxtDecompress(ref DxtImage cImage, DXGI_FORMAT format, IntPtr image);
Exemplo n.º 14
0
 private extern static uint dxtCompress(ref DxtImage srcImage, DXGI_FORMAT format, TEX_COMPRESS_FLAGS compress, float alphaRef, IntPtr cImage);
Exemplo n.º 15
0
 private extern static uint dxtConvert(ref DxtImage srcImage, DXGI_FORMAT format, TEX_FILTER_FLAGS filter, float threshold, IntPtr cImage);