diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-02-21 14:29:22 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-02-21 14:29:22 +0100 |
| commit | 5eb4ae08d5cd81f7315998394054aa50e52b6870 (patch) | |
| tree | 1174490ccb5cbcb4167d715a30d385e796beb25d /atlas.cpp | |
| parent | b8aa39d289c605b13bb550b786cba3f646fa5b48 (diff) | |
buffer flush
Diffstat (limited to 'atlas.cpp')
| -rw-r--r-- | atlas.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,5 @@ #include "atlas.hpp" +#include "defs.hpp" #include <Magnum/ImageView.h> #include <Magnum/GL/TextureFormat.h> @@ -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); } |
