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