mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +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) {
|
static size_t getMemoryForSize(const uvec2& size) {
|
||||||
// Base size
|
// Base size + mips
|
||||||
size_t result = ((size.x * size.y) << 2);
|
return static_cast<size_t>(((size.x * size.y) << 2) * 1.33f);
|
||||||
// Accounting for mips
|
|
||||||
result += (result >> 1);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroyTexture(GLuint texture) {
|
void destroyTexture(GLuint texture) {
|
||||||
|
|
Loading…
Reference in a new issue