From d6db27e633b1b8850fb093a8e5fad439ac3b0465 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 30 Jan 2021 20:03:47 +0200 Subject: [PATCH] Improve allocation handling in cube map textures While there isn't enough bits to track all face allocations, tracking the base level per face is possible. This allows mipmap generation to work more sensibly. --- source/texturecube.cpp | 27 ++++++++++++++++++++------- source/texturecube.h | 2 ++ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/source/texturecube.cpp b/source/texturecube.cpp index 82447e65..14ddf43d 100644 --- a/source/texturecube.cpp +++ b/source/texturecube.cpp @@ -71,7 +71,7 @@ void TextureCube::allocate(unsigned level) throw invalid_operation("TextureCube::allocate"); if(level>=levels) throw invalid_argument("TextureCube::allocate"); - if(allocated&(1<