From 5eb4ae08d5cd81f7315998394054aa50e52b6870 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 21 Feb 2022 14:29:22 +0100 Subject: buffer flush --- atlas.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'atlas.cpp') diff --git a/atlas.cpp b/atlas.cpp index 4e384540..1463c26a 100644 --- a/atlas.cpp +++ b/atlas.cpp @@ -1,4 +1,5 @@ #include "atlas.hpp" +#include "defs.hpp" #include #include @@ -12,10 +13,11 @@ atlas_texture::atlas_texture(const Trade::ImageData2D& image, Vector2i dims) : CORRADE_INTERNAL_ASSERT(dims_[0] > 0 && dims_[1] > 0); CORRADE_INTERNAL_ASSERT(tile_size_ * dims_ == size_); CORRADE_INTERNAL_ASSERT(size_ % dims_ == Vector2i{}); + CORRADE_INTERNAL_ASSERT(dims.product() < 256); tex_.setWrapping(GL::SamplerWrapping::ClampToEdge) .setMagnificationFilter(GL::SamplerFilter::Linear) .setMinificationFilter(GL::SamplerFilter::Linear) - .setStorage(1, GL::textureFormat(image.format()), image.size()) + .setStorage(MIPMAP_LEVEL, GL::textureFormat(image.format()), image.size()) .setSubImage(0, {}, image); } -- cgit v1.2.3