diff options
| author | John Schoenick <[email protected]> | 2015-09-09 18:35:41 -0700 |
|---|---|---|
| committer | John Schoenick <[email protected]> | 2015-09-09 18:35:41 -0700 |
| commit | 0d8dceea4310fde5706b3ce1c70609d72a38efdf (patch) | |
| tree | c831ef32c2c801a5c5a80401736b52c7b5a528ec /mp/src/public/bitmap | |
| parent | Updated the SDK with the latest code from the TF and HL2 branches. (diff) | |
| download | source-sdk-2013-master.tar.xz source-sdk-2013-master.zip | |
Diffstat (limited to 'mp/src/public/bitmap')
| -rw-r--r-- | mp/src/public/bitmap/imageformat.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 |