feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -30,12 +30,14 @@
|
|||
|
||||
#include "geometry_2d.h"
|
||||
|
||||
#include "core/math/math_funcs_binary.h"
|
||||
|
||||
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Walloc-zero")
|
||||
#include "thirdparty/clipper2/include/clipper2/clipper.h"
|
||||
#include <thirdparty/clipper2/include/clipper2/clipper.h>
|
||||
GODOT_GCC_WARNING_POP
|
||||
#include "thirdparty/misc/polypartition.h"
|
||||
#include <thirdparty/misc/polypartition.h>
|
||||
#define STB_RECT_PACK_IMPLEMENTATION
|
||||
#include "thirdparty/misc/stb_rect_pack.h"
|
||||
#include <thirdparty/misc/stb_rect_pack.h>
|
||||
|
||||
const int clipper_precision = 5; // Based on CMP_EPSILON.
|
||||
|
||||
|
|
@ -227,8 +229,8 @@ void Geometry2D::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_re
|
|||
real_t best_aspect = 1e20;
|
||||
|
||||
for (int i = 0; i < results.size(); i++) {
|
||||
real_t h = next_power_of_2((uint32_t)results[i].max_h);
|
||||
real_t w = next_power_of_2((uint32_t)results[i].max_w);
|
||||
real_t h = Math::next_power_of_2((uint32_t)results[i].max_h);
|
||||
real_t w = Math::next_power_of_2((uint32_t)results[i].max_w);
|
||||
real_t aspect = h > w ? h / w : w / h;
|
||||
if (aspect < best_aspect) {
|
||||
best = i;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue