diff options
Diffstat (limited to 'Runtime/Graphics/ImageConversion.h')
-rw-r--r-- | Runtime/Graphics/ImageConversion.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Runtime/Graphics/ImageConversion.h b/Runtime/Graphics/ImageConversion.h new file mode 100644 index 0000000..31ed2e0 --- /dev/null +++ b/Runtime/Graphics/ImageConversion.h @@ -0,0 +1,28 @@ +#ifndef _IMAGECONVERSION_H +#define _IMAGECONVERSION_H + +#include "Runtime/Utilities/dynamic_array.h" + +class ImageReference; +class Texture2D; +typedef dynamic_array<UInt8> MemoryBuffer; + +bool ConvertImageToPNGBuffer( const ImageReference& image, MemoryBuffer& buffer ); + +enum LoadImageCompression { + kLoadImageUncompressed = 0, + kLoadImageDXTCompress, + kLoadImageDXTCompressDithered, +}; +bool LoadMemoryBufferIntoTexture( Texture2D& tex, const UInt8* data, size_t size, LoadImageCompression compression, bool markNonReadable=false ); + + +// hack: this is used only by capture screenshot. Compile code out if it's not +// available +#include "Runtime/Misc/CaptureScreenshot.h" +#if CAPTURE_SCREENSHOT_AVAILABLE +bool ConvertImageToPNGFile( const ImageReference& image, const std::string& path ); +#endif + + +#endif |