aboutsummaryrefslogtreecommitdiff
path: root/editor/io_plugins
diff options
context:
space:
mode:
authorMarcelo Fernandez2017-08-17 18:35:55 -0300
committerMarcelo Fernandez2017-08-17 19:51:13 -0300
commiteab850524ead092ed9fe22e57955e59eae373b79 (patch)
tree1ec2718c0810d852b51c4d40c135f4dde3841906 /editor/io_plugins
parent33c1d25517050470689924c60414feaf295ce05f (diff)
downloadgodot-eab850524ead092ed9fe22e57955e59eae373b79.tar.gz
godot-eab850524ead092ed9fe22e57955e59eae373b79.tar.zst
godot-eab850524ead092ed9fe22e57955e59eae373b79.zip
Add closest_power_of_2 func and implement mix_rate/latency on OS X
Diffstat (limited to 'editor/io_plugins')
-rw-r--r--editor/io_plugins/editor_font_import_plugin.cpp4
-rw-r--r--editor/io_plugins/editor_texture_import_plugin.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/editor/io_plugins/editor_font_import_plugin.cpp b/editor/io_plugins/editor_font_import_plugin.cpp
index 9831e08cf..25d8a5b7e 100644
--- a/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/editor/io_plugins/editor_font_import_plugin.cpp
@@ -1536,8 +1536,8 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
Vector<Point2i> res;
Size2i res_size;
EditorAtlas::fit(sizes,res,res_size);
- res_size.x=nearest_power_of_2(res_size.x);
- res_size.y=nearest_power_of_2(res_size.y);
+ res_size.x=next_power_of_2(res_size.x);
+ res_size.y=next_power_of_2(res_size.y);
print_line("Atlas size: "+res_size);
Image atlas(res_size.x,res_size.y,0,Image::FORMAT_RGBA8);
diff --git a/editor/io_plugins/editor_texture_import_plugin.cpp b/editor/io_plugins/editor_texture_import_plugin.cpp
index 095bc02fa..1dc264147 100644
--- a/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -1280,8 +1280,8 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
int atlas_w=dst_size.width;
int atlas_h=dst_size.height;
if (blit_to_po2) {
- atlas_w=nearest_power_of_2(dst_size.width);
- atlas_h=nearest_power_of_2(dst_size.height);
+ atlas_w=next_power_of_2(dst_size.width);
+ atlas_h=next_power_of_2(dst_size.height);
}
Image atlas;
atlas.create(atlas_w,atlas_h,0,alpha?Image::FORMAT_RGBA8:Image::FORMAT_RGB8);