summaryrefslogtreecommitdiff
path: root/assetFactory/texturePacker.h
diff options
context:
space:
mode:
Diffstat (limited to 'assetFactory/texturePacker.h')
-rw-r--r--assetFactory/texturePacker.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/assetFactory/texturePacker.h b/assetFactory/texturePacker.h
index a1b270b..05e3204 100644
--- a/assetFactory/texturePacker.h
+++ b/assetFactory/texturePacker.h
@@ -1,13 +1,14 @@
#pragma once
+#include "config/types.h"
#include <glm/vec2.hpp>
#include <span>
#include <vector>
class TexturePacker {
public:
- using Position = glm::uvec2;
- using Size = glm::uvec2;
+ using Position = TextureAbsCoord;
+ using Size = TextureAbsCoord;
struct Area {
#ifndef __cpp_aggregate_paren_init
@@ -16,12 +17,14 @@ public:
Position position;
Size size;
+
bool
operator<(const Area & other) const
{
return area(size) < area(other.size);
}
};
+
using Image = Size;
using Space = Area;
using Positions = std::vector<Position>;
@@ -38,5 +41,5 @@ public:
private:
std::span<const Image> inputImages;
std::vector<size_t> sortedIndexes;
- unsigned int maxTextureSize;
+ GLsizei maxTextureSize;
};