diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-06 20:48:33 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-11-07 01:02:02 +0000 |
commit | 2f8d7643d03f39fa848576692264d0fe3a37ed91 (patch) | |
tree | f4578e2ce3020c04a206f9eb0bc02587de5b3d6a /gfx/models | |
parent | Don't request a specific OpenGL version, just check we get something sufficie... (diff) | |
download | ilt-2f8d7643d03f39fa848576692264d0fe3a37ed91.tar.bz2 ilt-2f8d7643d03f39fa848576692264d0fe3a37ed91.tar.xz ilt-2f8d7643d03f39fa848576692264d0fe3a37ed91.zip |
Reformat with new clang-format
Diffstat (limited to 'gfx/models')
-rw-r--r-- | gfx/models/texture.cpp | 2 | ||||
-rw-r--r-- | gfx/models/tga.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/gfx/models/texture.cpp b/gfx/models/texture.cpp index 380f2e0..b7f1bee 100644 --- a/gfx/models/texture.cpp +++ b/gfx/models/texture.cpp @@ -139,11 +139,13 @@ GLuint TextureAtlas::add(glm::ivec2 position, glm::ivec2 size, void * data, TextureOptions to) { glTextureSubImage2D(m_texture, 0, position.x, position.y, size.x, size.y, GL_RGBA, GL_UNSIGNED_BYTE, data); + struct Material { glm::vec<2, uint16_t> position, size; TextureOptions::MapMode wrapU; TextureOptions::MapMode wrapV; } material {position, size, to.wrapU, to.wrapV}; + static_assert(sizeof(Material) <= 32); glTextureSubImage2D(m_atlas, 0, 0, static_cast<GLsizei>(used), 2, 1, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT, &material); return ++used; diff --git a/gfx/models/tga.h b/gfx/models/tga.h index 1f400ef..52db220 100644 --- a/gfx/models/tga.h +++ b/gfx/models/tga.h @@ -11,4 +11,5 @@ struct TGAHead { uint8_t pixelDepth {}; uint8_t descriptor {}; }; + static_assert(sizeof(TGAHead) == 18); |