mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 09:33:45 +02:00
Correct mip calculation
This commit is contained in:
parent
1bd398ae5e
commit
e9ac110072
1 changed files with 2 additions and 5 deletions
|
@ -116,11 +116,8 @@ private:
|
|||
}
|
||||
|
||||
static size_t getMemoryForSize(const uvec2& size) {
|
||||
// Base size
|
||||
size_t result = ((size.x * size.y) << 2);
|
||||
// Accounting for mips
|
||||
result += (result >> 1);
|
||||
return result;
|
||||
// Base size + mips
|
||||
return static_cast<size_t>(((size.x * size.y) << 2) * 1.33f);
|
||||
}
|
||||
|
||||
void destroyTexture(GLuint texture) {
|
||||
|
|
Loading…
Reference in a new issue