diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2021-04-06 22:05:56 -0700 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-04-13 00:12:12 +0200 |
commit | d840165a324b5c218ca3a4882f030986855c8383 (patch) | |
tree | 7c5f4b091ecc647f2b6ed48135945f84c6dc2de9 /thirdparty/etcpak/ColorSpace.hpp | |
parent | b895071895cffcbcda7f4156d7175ba5b8068852 (diff) |
Add `etcpak` library for faster ETC/ETC2/S3TC imports.
- `etc` module was renamed to `etcpak` and modified to use the new library.
- PKM importer is removed in the process, it's obsolete.
- Old library `etc2comp` is removed.
- S3TC compression no longer done via `squish` (but decompression still is).
- Slight modifications to etcpak sources for MinGW compatibility,
to fix LLVM `-Wc++11-narrowing` errors, and to allow using vendored or
system libpng.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'thirdparty/etcpak/ColorSpace.hpp')
-rw-r--r-- | thirdparty/etcpak/ColorSpace.hpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/thirdparty/etcpak/ColorSpace.hpp b/thirdparty/etcpak/ColorSpace.hpp new file mode 100644 index 0000000000..c9d0a9cf3f --- /dev/null +++ b/thirdparty/etcpak/ColorSpace.hpp @@ -0,0 +1,36 @@ +#ifndef __DARKRL__COLORSPACE_HPP__ +#define __DARKRL__COLORSPACE_HPP__ + +#include "Vector.hpp" + +namespace Color +{ + + class Lab; + + class XYZ + { + public: + XYZ( float x, float y, float z ); + XYZ( const v3b& rgb ); + XYZ( const Lab& lab ); + + v3i RGB() const; + + float x, y, z; + }; + + class Lab + { + public: + Lab(); + Lab( float L, float a, float b ); + Lab( const XYZ& xyz ); + Lab( const v3b& rgb ); + + float L, a, b; + }; + +} + +#endif |