summaryrefslogtreecommitdiffstats
path: root/game/client/world/voxel_atlas.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-14 19:16:44 +0500
committeruntodesu <kirill@untode.su>2025-09-14 19:16:44 +0500
commit8bcbd2729388edc63c82d77d314b583af1447c49 (patch)
tree460c2b509372077f6adf95d72c4245988a580aed /game/client/world/voxel_atlas.cc
parent7fc7fdb001bea8674fe0dbc1b962f3ec2702debb (diff)
downloadvoxelius-8bcbd2729388edc63c82d77d314b583af1447c49.tar.bz2
voxelius-8bcbd2729388edc63c82d77d314b583af1447c49.zip
Cleanup math with qfengine ports again
Diffstat (limited to 'game/client/world/voxel_atlas.cc')
-rw-r--r--game/client/world/voxel_atlas.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/game/client/world/voxel_atlas.cc b/game/client/world/voxel_atlas.cc
index a01db12..67832d3 100644
--- a/game/client/world/voxel_atlas.cc
+++ b/game/client/world/voxel_atlas.cc
@@ -96,12 +96,12 @@ void world::voxel_atlas::create(int width, int height, std::size_t count)
// how voxel quad meshes are packed in memory: each texture index is
// confined in 11 bits so having bigger atlas planes makes no sense;
glGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &max_plane_layers);
- max_plane_layers = math::clamp(max_plane_layers, 256, 2048);
+ max_plane_layers = glm::clamp(max_plane_layers, 256, 2048);
for(long i = count; i > 0L; i -= max_plane_layers) {
AtlasPlane plane = {};
plane.plane_id = planes.size();
- plane.layer_count_max = math::min<std::size_t>(max_plane_layers, i);
+ plane.layer_count_max = glm::min<std::size_t>(max_plane_layers, i);
plane.layer_count = 0;
const std::size_t save_id = plane.plane_id;