mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add 64-bit versions of core power of 2 functions
This commit is contained in:
parent
64b09905c7
commit
f6f1df7d73
25 changed files with 161 additions and 124 deletions
|
@ -275,7 +275,7 @@ _FORCE_INLINE_ TextServerFallback::FontTexturePosition TextServerFallback::find_
|
|||
// Could not find texture to fit, create one.
|
||||
int texsize = MAX(p_data->size.x * 0.125, 256);
|
||||
|
||||
texsize = next_power_of_2(texsize);
|
||||
texsize = next_power_of_2((uint32_t)texsize);
|
||||
|
||||
if (p_msdf) {
|
||||
texsize = MIN(texsize, 2048);
|
||||
|
@ -283,10 +283,10 @@ _FORCE_INLINE_ TextServerFallback::FontTexturePosition TextServerFallback::find_
|
|||
texsize = MIN(texsize, 1024);
|
||||
}
|
||||
if (mw > texsize) { // Special case, adapt to it?
|
||||
texsize = next_power_of_2(mw);
|
||||
texsize = next_power_of_2((uint32_t)mw);
|
||||
}
|
||||
if (mh > texsize) { // Special case, adapt to it?
|
||||
texsize = next_power_of_2(mh);
|
||||
texsize = next_power_of_2((uint32_t)mh);
|
||||
}
|
||||
|
||||
ShelfPackTexture tex = ShelfPackTexture(texsize, texsize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue