diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-14 02:56:33 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-14 02:56:33 +0100 |
commit | c44e7537d027cba66abe564b247549040426ebfe (patch) | |
tree | da1861ea38a619be11cb3befcc4c08a931203835 /gfx/models/tga.h | |
parent | No need to pass size around, we can get it back from the texture (diff) | |
download | ilt-c44e7537d027cba66abe564b247549040426ebfe.tar.bz2 ilt-c44e7537d027cba66abe564b247549040426ebfe.tar.xz ilt-c44e7537d027cba66abe564b247549040426ebfe.zip |
Externalise a neater definition of TGAHead
Diffstat (limited to 'gfx/models/tga.h')
-rw-r--r-- | gfx/models/tga.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gfx/models/tga.h b/gfx/models/tga.h new file mode 100644 index 0000000..1f400ef --- /dev/null +++ b/gfx/models/tga.h @@ -0,0 +1,14 @@ +#pragma once + +#include <cstdint> +#include <glm/vec2.hpp> + +struct TGAHead { + uint8_t idLength {}, colorMapType {}, format {}; + uint16_t __attribute__((packed)) colorMapFirst {}, colorMapLength {}; + uint8_t colorMapEntrySize {}; + glm::vec<2, uint16_t> origin {}, size {}; + uint8_t pixelDepth {}; + uint8_t descriptor {}; +}; +static_assert(sizeof(TGAHead) == 18); |