From 0d8dceea4310fde5706b3ce1c70609d72a38efdf Mon Sep 17 00:00:00 2001 From: John Schoenick Date: Wed, 9 Sep 2015 18:35:41 -0700 Subject: Updated the SDK with the latest code from the TF and HL2 branches. --- mp/src/public/bitmap/imageformat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mp/src/public/bitmap') diff --git a/mp/src/public/bitmap/imageformat.h b/mp/src/public/bitmap/imageformat.h index 1a35cab1..3e8f7b13 100644 --- a/mp/src/public/bitmap/imageformat.h +++ b/mp/src/public/bitmap/imageformat.h @@ -100,6 +100,9 @@ enum ImageFormat IMAGE_FORMAT_LE_BGRA8888, #endif + IMAGE_FORMAT_DXT1_RUNTIME, + IMAGE_FORMAT_DXT5_RUNTIME, + NUM_IMAGE_FORMATS }; @@ -448,6 +451,9 @@ namespace ImageLoader int height, int depth, ImageFormat imageFormat, float srcGamma, float dstGamma, int numLevels = 0 ); + // Low quality mipmap generation, but way faster. + void GenerateMipmapLevelsLQ( unsigned char* pSrc, unsigned char* pDst, int width, int height, + ImageFormat imageFormat, int numLevels ); //----------------------------------------------------------------------------- // operations on square images (src and dst can be the same) @@ -511,6 +517,10 @@ namespace ImageLoader return ( info.m_NumRedBits > 8 || info.m_NumGreeBits > 8 || info.m_NumBlueBits > 8 || info.m_NumAlphaBits > 8 ); } + inline bool IsRuntimeCompressed( ImageFormat fmt ) + { + return ( fmt == IMAGE_FORMAT_DXT1_RUNTIME ) || ( fmt == IMAGE_FORMAT_DXT5_RUNTIME ); + } } // end namespace ImageLoader -- cgit v1.2.3