Merge pull request #55326 from akien-mga/3.4-cherrypicks
This commit is contained in:
commit
7b0801c7fb
|
@ -289,6 +289,13 @@ opts.Update(env_base)
|
|||
env_base["platform"] = selected_platform # Must always be re-set after calling opts.Update().
|
||||
Help(opts.GenerateHelpText(env_base))
|
||||
|
||||
# Detect and print a warning listing unknown SCons variables to ease troubleshooting.
|
||||
unknown = opts.UnknownVariables()
|
||||
if unknown:
|
||||
print("WARNING: Unknown SCons variables were passed and will be ignored:")
|
||||
for item in unknown.items():
|
||||
print(" " + item[0] + "=" + item[1])
|
||||
|
||||
# add default include paths
|
||||
|
||||
env_base.Prepend(CPPPATH=["#"])
|
||||
|
|
|
@ -49,10 +49,10 @@
|
|||
#include "bvh_tree.h"
|
||||
#include "core/os/mutex.h"
|
||||
|
||||
#define BVHTREE_CLASS BVH_Tree<T, 2, MAX_ITEMS, USE_PAIRS, Bounds, Point>
|
||||
#define BVHTREE_CLASS BVH_Tree<T, 2, MAX_ITEMS, USE_PAIRS, BOUNDS, POINT>
|
||||
#define BVH_LOCKED_FUNCTION BVHLockedFunction(&_mutex, BVH_THREAD_SAFE &&_thread_safe);
|
||||
|
||||
template <class T, bool USE_PAIRS = false, int MAX_ITEMS = 32, class Bounds = AABB, class Point = Vector3, bool BVH_THREAD_SAFE = true>
|
||||
template <class T, bool USE_PAIRS = false, int MAX_ITEMS = 32, class BOUNDS = AABB, class POINT = Vector3, bool BVH_THREAD_SAFE = true>
|
||||
class BVH_Manager {
|
||||
public:
|
||||
// note we are using uint32_t instead of BVHHandle, losing type safety, but this
|
||||
|
@ -80,12 +80,7 @@ public:
|
|||
|
||||
void params_set_pairing_expansion(real_t p_value) {
|
||||
BVH_LOCKED_FUNCTION
|
||||
if (p_value >= 0.0) {
|
||||
tree._pairing_expansion = p_value;
|
||||
tree._auto_pairing_expansion = false;
|
||||
} else {
|
||||
tree._auto_pairing_expansion = true;
|
||||
}
|
||||
tree.params_set_pairing_expansion(p_value);
|
||||
}
|
||||
|
||||
void set_pair_callback(PairCallback p_callback, void *p_userdata) {
|
||||
|
@ -104,7 +99,7 @@ public:
|
|||
check_pair_callback_userdata = p_userdata;
|
||||
}
|
||||
|
||||
BVHHandle create(T *p_userdata, bool p_active, const Bounds &p_aabb = Bounds(), int p_subindex = 0, bool p_pairable = false, uint32_t p_pairable_type = 0, uint32_t p_pairable_mask = 1) {
|
||||
BVHHandle create(T *p_userdata, bool p_active, const BOUNDS &p_aabb = BOUNDS(), int p_subindex = 0, bool p_pairable = false, uint32_t p_pairable_type = 0, uint32_t p_pairable_mask = 1) {
|
||||
BVH_LOCKED_FUNCTION
|
||||
|
||||
// not sure if absolutely necessary to flush collisions here. It will cost performance to, instead
|
||||
|
@ -125,7 +120,7 @@ public:
|
|||
|
||||
if (USE_PAIRS) {
|
||||
// for safety initialize the expanded AABB
|
||||
Bounds &expanded_aabb = tree._pairs[h.id()].expanded_aabb;
|
||||
BOUNDS &expanded_aabb = tree._pairs[h.id()].expanded_aabb;
|
||||
expanded_aabb = p_aabb;
|
||||
expanded_aabb.grow_by(tree._pairing_expansion);
|
||||
|
||||
|
@ -142,7 +137,7 @@ public:
|
|||
////////////////////////////////////////////////////
|
||||
// wrapper versions that use uint32_t instead of handle
|
||||
// for backward compatibility. Less type safe
|
||||
void move(uint32_t p_handle, const Bounds &p_aabb) {
|
||||
void move(uint32_t p_handle, const BOUNDS &p_aabb) {
|
||||
BVHHandle h;
|
||||
h.set(p_handle);
|
||||
move(h, p_aabb);
|
||||
|
@ -166,7 +161,7 @@ public:
|
|||
force_collision_check(h);
|
||||
}
|
||||
|
||||
bool activate(uint32_t p_handle, const Bounds &p_aabb, bool p_delay_collision_check = false) {
|
||||
bool activate(uint32_t p_handle, const BOUNDS &p_aabb, bool p_delay_collision_check = false) {
|
||||
BVHHandle h;
|
||||
h.set(p_handle);
|
||||
return activate(h, p_aabb, p_delay_collision_check);
|
||||
|
@ -203,7 +198,7 @@ public:
|
|||
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
void move(BVHHandle p_handle, const Bounds &p_aabb) {
|
||||
void move(BVHHandle p_handle, const BOUNDS &p_aabb) {
|
||||
BVH_LOCKED_FUNCTION
|
||||
if (tree.item_move(p_handle, p_aabb)) {
|
||||
if (USE_PAIRS) {
|
||||
|
@ -239,7 +234,7 @@ public:
|
|||
BVH_LOCKED_FUNCTION
|
||||
if (USE_PAIRS) {
|
||||
// the aabb should already be up to date in the BVH
|
||||
Bounds aabb;
|
||||
BOUNDS aabb;
|
||||
item_get_AABB(p_handle, aabb);
|
||||
|
||||
// add it as changed even if aabb not different
|
||||
|
@ -253,7 +248,7 @@ public:
|
|||
// these should be read as set_visible for render trees,
|
||||
// but generically this makes items add or remove from the
|
||||
// tree internally, to speed things up by ignoring inactive items
|
||||
bool activate(BVHHandle p_handle, const Bounds &p_aabb, bool p_delay_collision_check = false) {
|
||||
bool activate(BVHHandle p_handle, const BOUNDS &p_aabb, bool p_delay_collision_check = false) {
|
||||
BVH_LOCKED_FUNCTION
|
||||
// sending the aabb here prevents the need for the BVH to maintain
|
||||
// a redundant copy of the aabb.
|
||||
|
@ -331,7 +326,7 @@ public:
|
|||
// when the pairable state changes, we need to force a collision check because newly pairable
|
||||
// items may be in collision, and unpairable items might move out of collision.
|
||||
// We cannot depend on waiting for the next update, because that may come much later.
|
||||
Bounds aabb;
|
||||
BOUNDS aabb;
|
||||
item_get_AABB(p_handle, aabb);
|
||||
|
||||
// passing false disables the optimization which prevents collision checks if
|
||||
|
@ -348,7 +343,7 @@ public:
|
|||
}
|
||||
|
||||
// cull tests
|
||||
int cull_aabb(const Bounds &p_aabb, T **p_result_array, int p_result_max, int *p_subindex_array = nullptr, uint32_t p_mask = 0xFFFFFFFF) {
|
||||
int cull_aabb(const BOUNDS &p_aabb, T **p_result_array, int p_result_max, int *p_subindex_array = nullptr, uint32_t p_mask = 0xFFFFFFFF) {
|
||||
BVH_LOCKED_FUNCTION
|
||||
typename BVHTREE_CLASS::CullParams params;
|
||||
|
||||
|
@ -366,7 +361,7 @@ public:
|
|||
return params.result_count_overall;
|
||||
}
|
||||
|
||||
int cull_segment(const Point &p_from, const Point &p_to, T **p_result_array, int p_result_max, int *p_subindex_array = nullptr, uint32_t p_mask = 0xFFFFFFFF) {
|
||||
int cull_segment(const POINT &p_from, const POINT &p_to, T **p_result_array, int p_result_max, int *p_subindex_array = nullptr, uint32_t p_mask = 0xFFFFFFFF) {
|
||||
BVH_LOCKED_FUNCTION
|
||||
typename BVHTREE_CLASS::CullParams params;
|
||||
|
||||
|
@ -385,7 +380,7 @@ public:
|
|||
return params.result_count_overall;
|
||||
}
|
||||
|
||||
int cull_point(const Point &p_point, T **p_result_array, int p_result_max, int *p_subindex_array = nullptr, uint32_t p_mask = 0xFFFFFFFF) {
|
||||
int cull_point(const POINT &p_point, T **p_result_array, int p_result_max, int *p_subindex_array = nullptr, uint32_t p_mask = 0xFFFFFFFF) {
|
||||
BVH_LOCKED_FUNCTION
|
||||
typename BVHTREE_CLASS::CullParams params;
|
||||
|
||||
|
@ -439,7 +434,7 @@ private:
|
|||
return;
|
||||
}
|
||||
|
||||
Bounds bb;
|
||||
BOUNDS bb;
|
||||
|
||||
typename BVHTREE_CLASS::CullParams params;
|
||||
|
||||
|
@ -454,7 +449,7 @@ private:
|
|||
const BVHHandle &h = changed_items[n];
|
||||
|
||||
// use the expanded aabb for pairing
|
||||
const Bounds &expanded_aabb = tree._pairs[h.id()].expanded_aabb;
|
||||
const BOUNDS &expanded_aabb = tree._pairs[h.id()].expanded_aabb;
|
||||
BVHABB_CLASS abb;
|
||||
abb.from(expanded_aabb);
|
||||
|
||||
|
@ -501,7 +496,7 @@ private:
|
|||
}
|
||||
|
||||
public:
|
||||
void item_get_AABB(BVHHandle p_handle, Bounds &r_aabb) {
|
||||
void item_get_AABB(BVHHandle p_handle, BOUNDS &r_aabb) {
|
||||
BVHABB_CLASS abb;
|
||||
tree.item_get_ABB(p_handle, abb);
|
||||
abb.to(r_aabb);
|
||||
|
@ -530,6 +525,10 @@ private:
|
|||
void *ud_from = pairs_from.remove_pair_to(p_to);
|
||||
pairs_to.remove_pair_to(p_from);
|
||||
|
||||
#ifdef BVH_VERBOSE_PAIRING
|
||||
print_line("_unpair " + itos(p_from.id()) + " from " + itos(p_to.id()));
|
||||
#endif
|
||||
|
||||
// callback
|
||||
if (unpair_callback) {
|
||||
unpair_callback(pair_callback_userdata, p_from, exa.userdata, exa.subindex, p_to, exb.userdata, exb.subindex, ud_from);
|
||||
|
@ -637,6 +636,10 @@ private:
|
|||
// callback
|
||||
void *callback_userdata = nullptr;
|
||||
|
||||
#ifdef BVH_VERBOSE_PAIRING
|
||||
print_line("_pair " + itos(p_ha.id()) + " to " + itos(p_hb.id()));
|
||||
#endif
|
||||
|
||||
if (pair_callback) {
|
||||
callback_userdata = pair_callback(pair_callback_userdata, p_ha, exa.userdata, exa.subindex, p_hb, exb.userdata, exb.subindex);
|
||||
}
|
||||
|
@ -697,19 +700,24 @@ private:
|
|||
_tick++;
|
||||
}
|
||||
|
||||
void _add_changed_item(BVHHandle p_handle, const Bounds &aabb, bool p_check_aabb = true) {
|
||||
void _add_changed_item(BVHHandle p_handle, const BOUNDS &aabb, bool p_check_aabb = true) {
|
||||
// Note that non pairable items can pair with pairable,
|
||||
// so all types must be added to the list
|
||||
|
||||
#ifdef BVH_EXPAND_LEAF_AABBS
|
||||
// if using expanded AABB in the leaf, the redundancy check will already have been made
|
||||
BOUNDS &expanded_aabb = tree._pairs[p_handle.id()].expanded_aabb;
|
||||
item_get_AABB(p_handle, expanded_aabb);
|
||||
#else
|
||||
// aabb check with expanded aabb. This greatly decreases processing
|
||||
// at the cost of slightly less accurate pairing checks
|
||||
// Note this pairing AABB is separate from the AABB in the actual tree
|
||||
Bounds &expanded_aabb = tree._pairs[p_handle.id()].expanded_aabb;
|
||||
BOUNDS &expanded_aabb = tree._pairs[p_handle.id()].expanded_aabb;
|
||||
|
||||
// passing p_check_aabb false disables the optimization which prevents collision checks if
|
||||
// the aabb hasn't changed. This is needed where set_pairable has been called, but the position
|
||||
// has not changed.
|
||||
if (p_check_aabb && expanded_aabb.encloses(aabb)) {
|
||||
if (p_check_aabb && tree.expanded_aabb_encloses_not_shrink(expanded_aabb, aabb)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -717,6 +725,7 @@ private:
|
|||
// this tick, because it is vital that the AABB is kept up to date
|
||||
expanded_aabb = aabb;
|
||||
expanded_aabb.grow_by(tree._pairing_expansion);
|
||||
#endif
|
||||
|
||||
// this code is to ensure that changed items only appear once on the updated list
|
||||
// collision checking them multiple times is not needed, and repeats the same thing
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#define BVH_ABB_H
|
||||
|
||||
// special optimized version of axis aligned bounding box
|
||||
template <class Bounds = AABB, class Point = Vector3>
|
||||
template <class BOUNDS = AABB, class POINT = Vector3>
|
||||
struct BVH_ABB {
|
||||
struct ConvexHull {
|
||||
// convex hulls (optional)
|
||||
|
@ -43,8 +43,8 @@ struct BVH_ABB {
|
|||
};
|
||||
|
||||
struct Segment {
|
||||
Point from;
|
||||
Point to;
|
||||
POINT from;
|
||||
POINT to;
|
||||
};
|
||||
|
||||
enum IntersectResult {
|
||||
|
@ -54,47 +54,47 @@ struct BVH_ABB {
|
|||
};
|
||||
|
||||
// we store mins with a negative value in order to test them with SIMD
|
||||
Point min;
|
||||
Point neg_max;
|
||||
POINT min;
|
||||
POINT neg_max;
|
||||
|
||||
bool operator==(const BVH_ABB &o) const { return (min == o.min) && (neg_max == o.neg_max); }
|
||||
bool operator!=(const BVH_ABB &o) const { return (*this == o) == false; }
|
||||
|
||||
void set(const Point &_min, const Point &_max) {
|
||||
void set(const POINT &_min, const POINT &_max) {
|
||||
min = _min;
|
||||
neg_max = -_max;
|
||||
}
|
||||
|
||||
// to and from standard AABB
|
||||
void from(const Bounds &p_aabb) {
|
||||
void from(const BOUNDS &p_aabb) {
|
||||
min = p_aabb.position;
|
||||
neg_max = -(p_aabb.position + p_aabb.size);
|
||||
}
|
||||
|
||||
void to(Bounds &r_aabb) const {
|
||||
void to(BOUNDS &r_aabb) const {
|
||||
r_aabb.position = min;
|
||||
r_aabb.size = calculate_size();
|
||||
}
|
||||
|
||||
void merge(const BVH_ABB &p_o) {
|
||||
for (int axis = 0; axis < Point::AXIS_COUNT; ++axis) {
|
||||
for (int axis = 0; axis < POINT::AXIS_COUNT; ++axis) {
|
||||
neg_max[axis] = MIN(neg_max[axis], p_o.neg_max[axis]);
|
||||
min[axis] = MIN(min[axis], p_o.min[axis]);
|
||||
}
|
||||
}
|
||||
|
||||
Point calculate_size() const {
|
||||
POINT calculate_size() const {
|
||||
return -neg_max - min;
|
||||
}
|
||||
|
||||
Point calculate_centre() const {
|
||||
return Point((calculate_size() * 0.5) + min);
|
||||
POINT calculate_centre() const {
|
||||
return POINT((calculate_size() * 0.5) + min);
|
||||
}
|
||||
|
||||
real_t get_proximity_to(const BVH_ABB &p_b) const {
|
||||
const Point d = (min - neg_max) - (p_b.min - p_b.neg_max);
|
||||
const POINT d = (min - neg_max) - (p_b.min - p_b.neg_max);
|
||||
real_t proximity = 0.0;
|
||||
for (int axis = 0; axis < Point::AXIS_COUNT; ++axis) {
|
||||
for (int axis = 0; axis < POINT::AXIS_COUNT; ++axis) {
|
||||
proximity += Math::abs(d[axis]);
|
||||
}
|
||||
return proximity;
|
||||
|
@ -104,7 +104,7 @@ struct BVH_ABB {
|
|||
return (get_proximity_to(p_a) < get_proximity_to(p_b) ? 0 : 1);
|
||||
}
|
||||
|
||||
uint32_t find_cutting_planes(const BVH_ABB::ConvexHull &p_hull, uint32_t *p_plane_ids) const {
|
||||
uint32_t find_cutting_planes(const typename BVH_ABB::ConvexHull &p_hull, uint32_t *p_plane_ids) const {
|
||||
uint32_t count = 0;
|
||||
|
||||
for (int n = 0; n < p_hull.num_planes; n++) {
|
||||
|
@ -162,7 +162,7 @@ struct BVH_ABB {
|
|||
}
|
||||
|
||||
bool intersects_convex_partial(const ConvexHull &p_hull) const {
|
||||
Bounds bb;
|
||||
BOUNDS bb;
|
||||
to(bb);
|
||||
return bb.intersects_convex_shape(p_hull.planes, p_hull.num_planes, p_hull.points, p_hull.num_points);
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ struct BVH_ABB {
|
|||
|
||||
bool is_within_convex(const ConvexHull &p_hull) const {
|
||||
// use half extents routine
|
||||
Bounds bb;
|
||||
BOUNDS bb;
|
||||
to(bb);
|
||||
return bb.inside_convex_shape(p_hull.planes, p_hull.num_planes);
|
||||
}
|
||||
|
@ -197,12 +197,12 @@ struct BVH_ABB {
|
|||
}
|
||||
|
||||
bool intersects_segment(const Segment &p_s) const {
|
||||
Bounds bb;
|
||||
BOUNDS bb;
|
||||
to(bb);
|
||||
return bb.intersects_segment(p_s.from, p_s.to);
|
||||
}
|
||||
|
||||
bool intersects_point(const Point &p_pt) const {
|
||||
bool intersects_point(const POINT &p_pt) const {
|
||||
if (_any_lessthan(-p_pt, neg_max)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -232,20 +232,20 @@ struct BVH_ABB {
|
|||
return true;
|
||||
}
|
||||
|
||||
void grow(const Point &p_change) {
|
||||
void grow(const POINT &p_change) {
|
||||
neg_max -= p_change;
|
||||
min -= p_change;
|
||||
}
|
||||
|
||||
void expand(real_t p_change) {
|
||||
Point change;
|
||||
POINT change;
|
||||
change.set_all(p_change);
|
||||
grow(change);
|
||||
}
|
||||
|
||||
// Actually surface area metric.
|
||||
float get_area() const {
|
||||
Point d = calculate_size();
|
||||
POINT d = calculate_size();
|
||||
return 2.0f * (d.x * d.y + d.y * d.z + d.z * d.x);
|
||||
}
|
||||
|
||||
|
@ -254,8 +254,8 @@ struct BVH_ABB {
|
|||
min = neg_max;
|
||||
}
|
||||
|
||||
bool _any_morethan(const Point &p_a, const Point &p_b) const {
|
||||
for (int axis = 0; axis < Point::AXIS_COUNT; ++axis) {
|
||||
bool _any_morethan(const POINT &p_a, const POINT &p_b) const {
|
||||
for (int axis = 0; axis < POINT::AXIS_COUNT; ++axis) {
|
||||
if (p_a[axis] > p_b[axis]) {
|
||||
return true;
|
||||
}
|
||||
|
@ -263,8 +263,8 @@ struct BVH_ABB {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool _any_lessthan(const Point &p_a, const Point &p_b) const {
|
||||
for (int axis = 0; axis < Point::AXIS_COUNT; ++axis) {
|
||||
bool _any_lessthan(const POINT &p_a, const POINT &p_b) const {
|
||||
for (int axis = 0; axis < POINT::AXIS_COUNT; ++axis) {
|
||||
if (p_a[axis] < p_b[axis]) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ struct CullParams {
|
|||
uint32_t pairable_type;
|
||||
|
||||
// optional components for different tests
|
||||
Point point;
|
||||
POINT point;
|
||||
BVHABB_CLASS abb;
|
||||
typename BVHABB_CLASS::ConvexHull hull;
|
||||
typename BVHABB_CLASS::Segment segment;
|
||||
|
|
|
@ -6,12 +6,12 @@ void _debug_recursive_print_tree(int p_tree_id) const {
|
|||
}
|
||||
|
||||
String _debug_aabb_to_string(const BVHABB_CLASS &aabb) const {
|
||||
Point size = aabb.calculate_size();
|
||||
POINT size = aabb.calculate_size();
|
||||
|
||||
String sz;
|
||||
float vol = 0.0;
|
||||
|
||||
for (int i = 0; i < Point::AXES_COUNT; ++i) {
|
||||
for (int i = 0; i < POINT::AXIS_COUNT; ++i) {
|
||||
sz += "(";
|
||||
sz += itos(aabb.min[i]);
|
||||
sz += " ~ ";
|
||||
|
|
|
@ -14,10 +14,10 @@ struct ItemPairs {
|
|||
void clear() {
|
||||
num_pairs = 0;
|
||||
extended_pairs.reset();
|
||||
expanded_aabb = Bounds();
|
||||
expanded_aabb = BOUNDS();
|
||||
}
|
||||
|
||||
Bounds expanded_aabb;
|
||||
BOUNDS expanded_aabb;
|
||||
|
||||
// maybe we can just use the number in the vector TODO
|
||||
int32_t num_pairs;
|
||||
|
@ -59,4 +59,14 @@ struct ItemPairs {
|
|||
|
||||
return userdata;
|
||||
}
|
||||
|
||||
// experiment : scale the pairing expansion by the number of pairs.
|
||||
// when the number of pairs is high, the density is high and a lower collision margin is better.
|
||||
// when there are few local pairs, a larger margin is more optimal.
|
||||
real_t scale_expansion_margin(real_t p_margin) const {
|
||||
real_t x = real_t(num_pairs) * (1.0 / 9.0);
|
||||
x = MIN(x, 1.0);
|
||||
x = 1.0 - x;
|
||||
return p_margin * x;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
public:
|
||||
BVHHandle item_add(T *p_userdata, bool p_active, const Bounds &p_aabb, int32_t p_subindex, bool p_pairable, uint32_t p_pairable_type, uint32_t p_pairable_mask, bool p_invisible = false) {
|
||||
BVHHandle item_add(T *p_userdata, bool p_active, const BOUNDS &p_aabb, int32_t p_subindex, bool p_pairable, uint32_t p_pairable_type, uint32_t p_pairable_mask, bool p_invisible = false) {
|
||||
#ifdef BVH_VERBOSE_TREE
|
||||
VERBOSE_PRINT("\nitem_add BEFORE");
|
||||
_debug_recursive_print_tree(0);
|
||||
|
@ -9,6 +9,13 @@ BVHHandle item_add(T *p_userdata, bool p_active, const Bounds &p_aabb, int32_t p
|
|||
BVHABB_CLASS abb;
|
||||
abb.from(p_aabb);
|
||||
|
||||
// NOTE that we do not expand the AABB for the first create even if
|
||||
// leaf expansion is switched on. This is for two reasons:
|
||||
// (1) We don't know if this object will move in future, in which case a non-expanded
|
||||
// bound would be better...
|
||||
// (2) We don't yet know how many objects will be paired, which is used to modify
|
||||
// the expansion margin.
|
||||
|
||||
// handle to be filled with the new item ref
|
||||
BVHHandle handle;
|
||||
|
||||
|
@ -103,7 +110,7 @@ void _debug_print_refs() {
|
|||
}
|
||||
|
||||
// returns false if noop
|
||||
bool item_move(BVHHandle p_handle, const Bounds &p_aabb) {
|
||||
bool item_move(BVHHandle p_handle, const BOUNDS &p_aabb) {
|
||||
uint32_t ref_id = p_handle.id();
|
||||
|
||||
// get the reference
|
||||
|
@ -115,10 +122,19 @@ bool item_move(BVHHandle p_handle, const Bounds &p_aabb) {
|
|||
BVHABB_CLASS abb;
|
||||
abb.from(p_aabb);
|
||||
|
||||
#ifdef BVH_EXPAND_LEAF_AABBS
|
||||
if (USE_PAIRS) {
|
||||
// scale the pairing expansion by the number of pairs.
|
||||
abb.expand(_pairs[ref_id].scale_expansion_margin(_pairing_expansion));
|
||||
} else {
|
||||
abb.expand(_pairing_expansion);
|
||||
}
|
||||
#endif
|
||||
|
||||
BVH_ASSERT(ref.tnode_id != BVHCommon::INVALID);
|
||||
TNode &tnode = _nodes[ref.tnode_id];
|
||||
|
||||
// does it fit within the current aabb?
|
||||
// does it fit within the current leaf aabb?
|
||||
if (tnode.aabb.is_other_within(abb)) {
|
||||
// do nothing .. fast path .. not moved enough to need refit
|
||||
|
||||
|
@ -129,9 +145,24 @@ bool item_move(BVHHandle p_handle, const Bounds &p_aabb) {
|
|||
BVHABB_CLASS &leaf_abb = leaf.get_aabb(ref.item_id);
|
||||
|
||||
// no change?
|
||||
#ifdef BVH_EXPAND_LEAF_AABBS
|
||||
BOUNDS leaf_aabb;
|
||||
leaf_abb.to(leaf_aabb);
|
||||
|
||||
// This test should pass in a lot of cases, and by returning false we can avoid
|
||||
// collision pairing checks later, which greatly reduces processing.
|
||||
if (expanded_aabb_encloses_not_shrink(leaf_aabb, p_aabb)) {
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
if (leaf_abb == abb) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BVH_VERBOSE_MOVES
|
||||
print_line("item_move " + itos(p_handle.id()) + "(within tnode aabb) : " + _debug_aabb_to_string(abb));
|
||||
#endif
|
||||
|
||||
leaf_abb = abb;
|
||||
_integrity_check_all();
|
||||
|
@ -139,6 +170,10 @@ bool item_move(BVHHandle p_handle, const Bounds &p_aabb) {
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifdef BVH_VERBOSE_MOVES
|
||||
print_line("item_move " + itos(p_handle.id()) + "(outside tnode aabb) : " + _debug_aabb_to_string(abb));
|
||||
#endif
|
||||
|
||||
uint32_t tree_id = _handle_get_tree_id(p_handle);
|
||||
|
||||
// remove and reinsert
|
||||
|
@ -206,7 +241,7 @@ void item_remove(BVHHandle p_handle) {
|
|||
}
|
||||
|
||||
// returns success
|
||||
bool item_activate(BVHHandle p_handle, const Bounds &p_aabb) {
|
||||
bool item_activate(BVHHandle p_handle, const BOUNDS &p_aabb) {
|
||||
uint32_t ref_id = p_handle.id();
|
||||
ItemRef &ref = _refs[ref_id];
|
||||
if (ref.is_active()) {
|
||||
|
@ -403,7 +438,7 @@ void update() {
|
|||
|
||||
// if there are no nodes, do nothing, but if there are...
|
||||
if (bound_valid) {
|
||||
Bounds bb;
|
||||
BOUNDS bb;
|
||||
world_bound.to(bb);
|
||||
real_t size = bb.get_longest_axis_size();
|
||||
|
||||
|
@ -421,3 +456,50 @@ void update() {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void params_set_pairing_expansion(real_t p_value) {
|
||||
if (p_value < 0.0) {
|
||||
#ifdef BVH_ALLOW_AUTO_EXPANSION
|
||||
_auto_pairing_expansion = true;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#ifdef BVH_ALLOW_AUTO_EXPANSION
|
||||
_auto_pairing_expansion = false;
|
||||
#endif
|
||||
|
||||
_pairing_expansion = p_value;
|
||||
|
||||
// calculate shrinking threshold
|
||||
const real_t fudge_factor = 1.1;
|
||||
_aabb_shrinkage_threshold = _pairing_expansion * POINT::AXIS_COUNT * 2.0 * fudge_factor;
|
||||
}
|
||||
|
||||
// This routine is not just an enclose check, it also checks for special case of shrinkage
|
||||
bool expanded_aabb_encloses_not_shrink(const BOUNDS &p_expanded_aabb, const BOUNDS &p_aabb) const {
|
||||
if (!p_expanded_aabb.encloses(p_aabb)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for special case of shrinkage. If the aabb has shrunk
|
||||
// significantly we want to create a new expanded bound, because
|
||||
// the previous expanded bound will have diverged significantly.
|
||||
const POINT &exp_size = p_expanded_aabb.size;
|
||||
const POINT &new_size = p_aabb.size;
|
||||
|
||||
real_t exp_l = 0.0;
|
||||
real_t new_l = 0.0;
|
||||
|
||||
for (int i = 0; i < POINT::AXIS_COUNT; ++i) {
|
||||
exp_l += exp_size[i];
|
||||
new_l += new_size[i];
|
||||
}
|
||||
|
||||
// is difference above some metric
|
||||
real_t diff = exp_l - new_l;
|
||||
if (diff < _aabb_shrinkage_threshold) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -25,16 +25,16 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
|
|||
return;
|
||||
}
|
||||
|
||||
Point centre = full_bound.calculate_centre();
|
||||
Point size = full_bound.calculate_size();
|
||||
POINT centre = full_bound.calculate_centre();
|
||||
POINT size = full_bound.calculate_size();
|
||||
|
||||
int order[Point::AXIS_COUNT];
|
||||
int order[POINT::AXIS_COUNT];
|
||||
|
||||
order[0] = size.min_axis();
|
||||
order[Point::AXIS_COUNT - 1] = size.max_axis();
|
||||
order[POINT::AXIS_COUNT - 1] = size.max_axis();
|
||||
|
||||
static_assert(Point::AXIS_COUNT <= 3, "BVH Point::AXIS_COUNT has unexpected size");
|
||||
if (Point::AXIS_COUNT == 3) {
|
||||
static_assert(POINT::AXIS_COUNT <= 3, "BVH POINT::AXIS_COUNT has unexpected size");
|
||||
if (POINT::AXIS_COUNT == 3) {
|
||||
order[1] = 3 - (order[0] + order[2]);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
|
|||
|
||||
// detect when split on longest axis failed
|
||||
int min_threshold = MAX_ITEMS / 4;
|
||||
int min_group_size[Point::AXIS_COUNT];
|
||||
int min_group_size[POINT::AXIS_COUNT];
|
||||
min_group_size[0] = MIN(num_a, num_b);
|
||||
if (min_group_size[0] < min_threshold) {
|
||||
// slow but sure .. first move everything back into a
|
||||
|
@ -68,7 +68,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
|
|||
num_b = 0;
|
||||
|
||||
// now calculate the best split
|
||||
for (int axis = 1; axis < Point::AXIS_COUNT; axis++) {
|
||||
for (int axis = 1; axis < POINT::AXIS_COUNT; axis++) {
|
||||
split_axis = order[axis];
|
||||
int count = 0;
|
||||
|
||||
|
@ -86,7 +86,7 @@ void _split_leaf_sort_groups_simple(int &num_a, int &num_b, uint16_t *group_a, u
|
|||
// best axis
|
||||
int best_axis = 0;
|
||||
int best_min = min_group_size[0];
|
||||
for (int axis = 1; axis < Point::AXIS_COUNT; axis++) {
|
||||
for (int axis = 1; axis < POINT::AXIS_COUNT; axis++) {
|
||||
if (min_group_size[axis] > best_min) {
|
||||
best_min = min_group_size[axis];
|
||||
best_axis = axis;
|
||||
|
|
|
@ -29,12 +29,6 @@ struct ItemExtra {
|
|||
T *userdata;
|
||||
};
|
||||
|
||||
// this is an item OR a child node depending on whether a leaf node
|
||||
struct Item {
|
||||
BVHABB_CLASS aabb;
|
||||
uint32_t item_ref_id;
|
||||
};
|
||||
|
||||
// tree leaf
|
||||
struct TLeaf {
|
||||
uint16_t num_items;
|
||||
|
@ -177,4 +171,14 @@ bool _auto_node_expansion = true;
|
|||
// larger values gives more 'sticky' pairing, and is less likely to exhibit tunneling
|
||||
// we can either use auto mode, where the expansion is based on the root node size, or specify manually
|
||||
real_t _pairing_expansion = 0.1;
|
||||
|
||||
#ifdef BVH_ALLOW_AUTO_EXPANSION
|
||||
bool _auto_pairing_expansion = true;
|
||||
#endif
|
||||
|
||||
// when using an expanded bound, we must detect the condition where a new AABB
|
||||
// is significantly smaller than the expanded bound, as this is a special case where we
|
||||
// should override the optimization and create a new expanded bound.
|
||||
// This threshold is derived from the _pairing_expansion, and should be recalculated
|
||||
// if _pairing_expansion is changed.
|
||||
real_t _aabb_shrinkage_threshold = 0.0;
|
||||
|
|
|
@ -48,12 +48,17 @@
|
|||
#include "core/print_string.h"
|
||||
#include <limits.h>
|
||||
|
||||
#define BVHABB_CLASS BVH_ABB<Bounds, Point>
|
||||
#define BVHABB_CLASS BVH_ABB<BOUNDS, POINT>
|
||||
|
||||
// not sure if this is better yet so making optional
|
||||
#define BVH_EXPAND_LEAF_AABBS
|
||||
|
||||
// never do these checks in release
|
||||
#if defined(TOOLS_ENABLED) && defined(DEBUG_ENABLED)
|
||||
//#define BVH_VERBOSE
|
||||
//#define BVH_VERBOSE_TREE
|
||||
//#define BVH_VERBOSE_PAIRING
|
||||
//#define BVH_VERBOSE_MOVES
|
||||
|
||||
//#define BVH_VERBOSE_FRAME
|
||||
//#define BVH_CHECKS
|
||||
|
@ -148,7 +153,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
template <class T, int MAX_CHILDREN, int MAX_ITEMS, bool USE_PAIRS = false, class Bounds = AABB, class Point = Vector3>
|
||||
template <class T, int MAX_CHILDREN, int MAX_ITEMS, bool USE_PAIRS = false, class BOUNDS = AABB, class POINT = Vector3>
|
||||
class BVH_Tree {
|
||||
friend class BVH;
|
||||
|
||||
|
@ -165,6 +170,11 @@ public:
|
|||
// (as these ids are stored as negative numbers in the node)
|
||||
uint32_t dummy_leaf_id;
|
||||
_leaves.request(dummy_leaf_id);
|
||||
|
||||
// In many cases you may want to change this default in the client code,
|
||||
// or expose this value to the user.
|
||||
// This default may make sense for a typically scaled 3d game, but maybe not for 2d on a pixel scale.
|
||||
params_set_pairing_expansion(0.1);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -55,6 +55,7 @@ Input::MouseMode Input::get_mouse_mode() const {
|
|||
|
||||
void Input::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("is_key_pressed", "scancode"), &Input::is_key_pressed);
|
||||
ClassDB::bind_method(D_METHOD("is_physical_key_pressed", "scancode"), &Input::is_physical_key_pressed);
|
||||
ClassDB::bind_method(D_METHOD("is_mouse_button_pressed", "button"), &Input::is_mouse_button_pressed);
|
||||
ClassDB::bind_method(D_METHOD("is_joy_button_pressed", "device", "button"), &Input::is_joy_button_pressed);
|
||||
ClassDB::bind_method(D_METHOD("is_action_pressed", "action", "exact"), &Input::is_action_pressed, DEFVAL(false));
|
||||
|
|
|
@ -79,6 +79,7 @@ public:
|
|||
static Input *get_singleton();
|
||||
|
||||
virtual bool is_key_pressed(int p_scancode) const = 0;
|
||||
virtual bool is_physical_key_pressed(int p_scancode) const = 0;
|
||||
virtual bool is_mouse_button_pressed(int p_button) const = 0;
|
||||
virtual bool is_joy_button_pressed(int p_device, int p_button) const = 0;
|
||||
virtual bool is_action_pressed(const StringName &p_action, bool p_exact = false) const = 0;
|
||||
|
|
|
@ -97,6 +97,7 @@ Variant PackedDataContainer::_iter_get_ofs(const Variant &p_iter, uint32_t p_off
|
|||
}
|
||||
|
||||
Variant PackedDataContainer::_get_at_ofs(uint32_t p_ofs, const uint8_t *p_buf, bool &err) const {
|
||||
ERR_FAIL_COND_V(p_ofs + 4 > (uint32_t)data.size(), Variant());
|
||||
uint32_t type = decode_uint32(p_buf + p_ofs);
|
||||
|
||||
if (type == TYPE_ARRAY || type == TYPE_DICT) {
|
||||
|
@ -119,6 +120,7 @@ Variant PackedDataContainer::_get_at_ofs(uint32_t p_ofs, const uint8_t *p_buf, b
|
|||
}
|
||||
|
||||
uint32_t PackedDataContainer::_type_at_ofs(uint32_t p_ofs) const {
|
||||
ERR_FAIL_COND_V(p_ofs + 4 > (uint32_t)data.size(), 0);
|
||||
PoolVector<uint8_t>::Read rd = data.read();
|
||||
ERR_FAIL_COND_V(!rd.ptr(), 0);
|
||||
const uint8_t *r = &rd[p_ofs];
|
||||
|
@ -128,6 +130,7 @@ uint32_t PackedDataContainer::_type_at_ofs(uint32_t p_ofs) const {
|
|||
};
|
||||
|
||||
int PackedDataContainer::_size(uint32_t p_ofs) const {
|
||||
ERR_FAIL_COND_V(p_ofs + 4 > (uint32_t)data.size(), 0);
|
||||
PoolVector<uint8_t>::Read rd = data.read();
|
||||
ERR_FAIL_COND_V(!rd.ptr(), 0);
|
||||
const uint8_t *r = &rd[p_ofs];
|
||||
|
@ -146,6 +149,7 @@ int PackedDataContainer::_size(uint32_t p_ofs) const {
|
|||
};
|
||||
|
||||
Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, bool &err) const {
|
||||
ERR_FAIL_COND_V(p_ofs + 4 > (uint32_t)data.size(), Variant());
|
||||
PoolVector<uint8_t>::Read rd = data.read();
|
||||
if (!rd.ptr()) {
|
||||
err = true;
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
</member>
|
||||
<member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon">
|
||||
Button's icon, if text is present the icon will be placed before the text.
|
||||
To edit margin and spacing of the icon, use [code]hseparation[/code] theme property of [Button] and [code]content_margin_*[/code] properties of the used [StyleBox]es.
|
||||
</member>
|
||||
<member name="text" type="String" setter="set_text" getter="get_text" default="""">
|
||||
The button's text that will be displayed inside the button's area.
|
||||
|
|
|
@ -264,6 +264,13 @@
|
|||
Returns [code]true[/code] if you are pressing the mouse button specified with [enum ButtonList].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_physical_key_pressed" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<argument index="0" name="scancode" type="int" />
|
||||
<description>
|
||||
Returns [code]true[/code] if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a [enum KeyList] constant.
|
||||
</description>
|
||||
</method>
|
||||
<method name="joy_connection_changed">
|
||||
<return type="void" />
|
||||
<argument index="0" name="device" type="int" />
|
||||
|
|
|
@ -202,6 +202,14 @@
|
|||
<description>
|
||||
Returns an array listing the groups that the node is a member of.
|
||||
[b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs.
|
||||
[b]Note:[/b] The engine uses some group names internally (all starting with an underscore). To avoid conflicts with internal groups, do not add custom groups whose name starts with an underscore. To exclude internal groups while looping over [method get_groups], use the following snippet:
|
||||
[codeblock]
|
||||
# Stores the node's non-internal groups only (as an array of Strings).
|
||||
var non_internal_groups = []
|
||||
for group in get_groups():
|
||||
if not group.begins_with("_"):
|
||||
non_internal_groups.push_back(group)
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_index" qualifiers="const">
|
||||
|
@ -513,6 +521,7 @@
|
|||
<argument index="1" name="keep_data" type="bool" default="false" />
|
||||
<description>
|
||||
Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost.
|
||||
Note that the replaced node is not automatically freed, so you either need to keep it in a variable for later use or free it using [method Object.free].
|
||||
</description>
|
||||
</method>
|
||||
<method name="request_ready">
|
||||
|
|
|
@ -201,6 +201,7 @@
|
|||
<argument index="0" name="property" type="NodePath" />
|
||||
<description>
|
||||
Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
|
||||
[b]Note:[/b] Even though the method takes [NodePath] argument, it doesn't support actual paths to [Node]s in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use [method Node.get_node_and_resource] instead.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_instance_id" qualifiers="const">
|
||||
|
|
|
@ -1016,6 +1016,11 @@
|
|||
Size of the hash table used for the broad-phase 2D hash grid algorithm.
|
||||
[b]Note:[/b] Not used if [member ProjectSettings.physics/2d/use_bvh] is enabled.
|
||||
</member>
|
||||
<member name="physics/2d/bvh_collision_margin" type="float" setter="" getter="" default="1.0">
|
||||
Additional expansion applied to object bounds in the 2D physics bounding volume hierarchy. This can reduce BVH processing at the cost of a slightly coarser broadphase, which can stress the physics more in some situations.
|
||||
The default value will work well in most situations. A value of 0.0 will turn this optimization off, and larger values may work better for larger, faster moving objects.
|
||||
[b]Note:[/b] Used only if [member ProjectSettings.physics/2d/use_bvh] is enabled.
|
||||
</member>
|
||||
<member name="physics/2d/cell_size" type="int" setter="" getter="" default="128">
|
||||
Cell size used for the broad-phase 2D hash grid algorithm (in pixels).
|
||||
[b]Note:[/b] Not used if [member ProjectSettings.physics/2d/use_bvh] is enabled.
|
||||
|
@ -1095,6 +1100,11 @@
|
|||
The default linear damp in 3D.
|
||||
[b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration.
|
||||
</member>
|
||||
<member name="physics/3d/godot_physics/bvh_collision_margin" type="float" setter="" getter="" default="0.1">
|
||||
Additional expansion applied to object bounds in the 3D physics bounding volume hierarchy. This can reduce BVH processing at the cost of a slightly coarser broadphase, which can stress the physics more in some situations.
|
||||
The default value will work well in most situations. A value of 0.0 will turn this optimization off, and larger values may work better for larger, faster moving objects.
|
||||
[b]Note:[/b] Used only if [member ProjectSettings.physics/3d/godot_physics/use_bvh] is enabled.
|
||||
</member>
|
||||
<member name="physics/3d/godot_physics/use_bvh" type="bool" setter="" getter="" default="true">
|
||||
Enables the use of bounding volume hierarchy instead of octree for 3D physics spatial partitioning. This may give better performance.
|
||||
</member>
|
||||
|
@ -1430,9 +1440,15 @@
|
|||
See also [member rendering/quality/skinning/force_software_skinning].
|
||||
[b]Note:[/b] When the software skinning fallback is triggered, custom vertex shaders will behave in a different way, because the bone transform will be already applied to the modelview matrix.
|
||||
</member>
|
||||
<member name="rendering/quality/spatial_partitioning/bvh_collision_margin" type="float" setter="" getter="" default="0.1">
|
||||
Additional expansion applied to object bounds in the 3D rendering bounding volume hierarchy. This can reduce BVH processing at the cost of a slightly reduced accuracy.
|
||||
The default value will work well in most situations. A value of 0.0 will turn this optimization off, and larger values may work better for larger, faster moving objects.
|
||||
[b]Note:[/b] Used only if [member ProjectSettings.rendering/quality/spatial_partitioning/use_bvh] is enabled.
|
||||
</member>
|
||||
<member name="rendering/quality/spatial_partitioning/render_tree_balance" type="float" setter="" getter="" default="0.0">
|
||||
The rendering octree balance can be changed to favor smaller ([code]0[/code]), or larger ([code]1[/code]) branches.
|
||||
Larger branches can increase performance significantly in some projects.
|
||||
[b]Note:[/b] Not used if [member ProjectSettings.rendering/quality/spatial_partitioning/use_bvh] is enabled.
|
||||
</member>
|
||||
<member name="rendering/quality/spatial_partitioning/use_bvh" type="bool" setter="" getter="" default="true">
|
||||
Enables the use of bounding volume hierarchy instead of octree for rendering spatial partitioning. This may give better performance.
|
||||
|
|
|
@ -384,6 +384,9 @@
|
|||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="bookmark_gutter" type="bool" setter="set_bookmark_gutter_enabled" getter="is_bookmark_gutter_enabled" default="false">
|
||||
If [code]true[/code], the bookmark gutter is visible.
|
||||
</member>
|
||||
<member name="breakpoint_gutter" type="bool" setter="set_breakpoint_gutter_enabled" getter="is_breakpoint_gutter_enabled" default="false">
|
||||
If [code]true[/code], the breakpoint gutter is visible.
|
||||
</member>
|
||||
|
|
|
@ -6760,10 +6760,12 @@ EditorNode::EditorNode() {
|
|||
file_export_lib->connect("file_selected", this, "_dialog_action");
|
||||
file_export_lib_merge = memnew(CheckBox);
|
||||
file_export_lib_merge->set_text(TTR("Merge With Existing"));
|
||||
file_export_lib_merge->set_h_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
file_export_lib_merge->set_pressed(true);
|
||||
file_export_lib->get_vbox()->add_child(file_export_lib_merge);
|
||||
file_export_lib_apply_xforms = memnew(CheckBox);
|
||||
file_export_lib_apply_xforms->set_text(TTR("Apply MeshInstance Transforms"));
|
||||
file_export_lib_apply_xforms->set_h_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
file_export_lib_apply_xforms->set_pressed(false);
|
||||
file_export_lib->get_vbox()->add_child(file_export_lib_apply_xforms);
|
||||
gui_base->add_child(file_export_lib);
|
||||
|
|
|
@ -131,7 +131,7 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
|
|||
int max_y = MIN(y[2], height - p_offset.y - 1);
|
||||
for (int yi = y[0]; yi < max_y; yi++) {
|
||||
if (yi >= 0) {
|
||||
for (int xi = (xf > 0 ? int(xf) : 0); xi < (xt < width ? xt : width - 1); xi++) {
|
||||
for (int xi = (xf > 0 ? int(xf) : 0); xi < (xt <= src_width ? xt : src_width); xi++) {
|
||||
int px = xi, py = yi;
|
||||
int sx = px, sy = py;
|
||||
sx = CLAMP(sx, 0, src_width - 1);
|
||||
|
@ -153,7 +153,7 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
|
|||
p_image->set_pixel(px, py, color);
|
||||
}
|
||||
|
||||
for (int xi = (xf < width ? int(xf) : width - 1); xi >= (xt > 0 ? xt : 0); xi--) {
|
||||
for (int xi = (xf < src_width ? int(xf) : src_width - 1); xi >= (xt > 0 ? xt : 0); xi--) {
|
||||
int px = xi, py = yi;
|
||||
int sx = px, sy = py;
|
||||
sx = CLAMP(sx, 0, src_width - 1);
|
||||
|
|
|
@ -71,6 +71,9 @@ void ThemeEditorPreview::_preview_visibility_changed() {
|
|||
|
||||
void ThemeEditorPreview::_picker_button_cbk() {
|
||||
picker_overlay->set_visible(picker_button->is_pressed());
|
||||
if (picker_button->is_pressed()) {
|
||||
_reset_picker_overlay();
|
||||
}
|
||||
}
|
||||
|
||||
Control *ThemeEditorPreview::_find_hovered_control(Control *p_parent, Vector2 p_mouse_position) {
|
||||
|
|
|
@ -1227,12 +1227,10 @@ void TileSetEditor::_on_scroll_container_input(const Ref<InputEvent> &p_event) {
|
|||
// to allow performing this action anywhere, even if the cursor isn't
|
||||
// hovering the texture in the workspace.
|
||||
if (mb->get_button_index() == BUTTON_WHEEL_UP && mb->is_pressed() && mb->get_control()) {
|
||||
print_line("zooming in");
|
||||
_zoom_in();
|
||||
// Don't scroll up after zooming in.
|
||||
accept_event();
|
||||
} else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && mb->is_pressed() && mb->get_control()) {
|
||||
print_line("zooming out");
|
||||
_zoom_out();
|
||||
// Don't scroll down after zooming out.
|
||||
accept_event();
|
||||
|
@ -2027,9 +2025,7 @@ void TileSetEditor::_update_tile_data() {
|
|||
data.occlusion_shape = tileset->tile_get_light_occluder(get_current_tile());
|
||||
current_tile_data[Vector2i()] = data;
|
||||
} else {
|
||||
int spacing = tileset->autotile_get_spacing(get_current_tile());
|
||||
Vector2 size = tileset->tile_get_region(get_current_tile()).size;
|
||||
Vector2 cell_count = (size / (tileset->autotile_get_size(get_current_tile()) + Vector2(spacing, spacing))).floor();
|
||||
Vector2 cell_count = _get_subtiles_count(get_current_tile());
|
||||
for (int y = 0; y < cell_count.y; y++) {
|
||||
for (int x = 0; x < cell_count.x; x++) {
|
||||
SubtileData data;
|
||||
|
@ -2129,10 +2125,7 @@ void TileSetEditor::_select_previous_tile() {
|
|||
case EDITMODE_NAVIGATION:
|
||||
case EDITMODE_PRIORITY:
|
||||
case EDITMODE_Z_INDEX: {
|
||||
int spacing = tileset->autotile_get_spacing(get_current_tile());
|
||||
Vector2 size = tileset->tile_get_region(get_current_tile()).size;
|
||||
Vector2 cell_count = (size / (tileset->autotile_get_size(get_current_tile()) + Vector2(spacing, spacing))).floor();
|
||||
edited_shape_coord = cell_count;
|
||||
edited_shape_coord = _get_subtiles_count(get_current_tile()) - Vector2(1, 1);
|
||||
_select_edited_shape_coord();
|
||||
} break;
|
||||
default: {
|
||||
|
@ -2175,6 +2168,17 @@ bool TileSetEditor::_sort_tiles(Variant p_a, Variant p_b) {
|
|||
}
|
||||
}
|
||||
|
||||
Vector2 TileSetEditor::_get_subtiles_count(int p_tile_id) {
|
||||
const int spacing = tileset->autotile_get_spacing(p_tile_id);
|
||||
const Vector2 region_size = tileset->tile_get_region(p_tile_id).size;
|
||||
const Vector2 subtile_size = tileset->autotile_get_size(p_tile_id);
|
||||
// In case of not perfect fit the last row/column is allowed to exceed the tile region.
|
||||
// The return value is the biggest integer-only `(m, n)` satisfying the formula:
|
||||
// (m, n) * subtile_size + (m - 1, n - 1) * spacing < region_size + subtile_size
|
||||
Vector2 mn = Vector2(1, 1) + (region_size / (subtile_size + Vector2(spacing, spacing)));
|
||||
return mn == mn.floor() ? mn.floor() - Vector2(1, 1) : mn.floor();
|
||||
}
|
||||
|
||||
void TileSetEditor::_select_next_subtile() {
|
||||
if (get_current_tile() == -1) {
|
||||
_select_next_tile();
|
||||
|
@ -2185,14 +2189,12 @@ void TileSetEditor::_select_next_subtile() {
|
|||
} else if (edit_mode == EDITMODE_REGION || edit_mode == EDITMODE_BITMASK || edit_mode == EDITMODE_ICON) {
|
||||
_select_next_tile();
|
||||
} else {
|
||||
int spacing = tileset->autotile_get_spacing(get_current_tile());
|
||||
Vector2 size = tileset->tile_get_region(get_current_tile()).size;
|
||||
Vector2 cell_count = (size / (tileset->autotile_get_size(get_current_tile()) + Vector2(spacing, spacing))).floor();
|
||||
if (edited_shape_coord.x > cell_count.x - 1 && edited_shape_coord.y > cell_count.y - 1) {
|
||||
Vector2 cell_count = _get_subtiles_count(get_current_tile());
|
||||
if (edited_shape_coord.x >= cell_count.x - 1 && edited_shape_coord.y >= cell_count.y - 1) {
|
||||
_select_next_tile();
|
||||
} else {
|
||||
edited_shape_coord.x++;
|
||||
if (edited_shape_coord.x > cell_count.x) {
|
||||
if (edited_shape_coord.x > cell_count.x - 1) {
|
||||
edited_shape_coord.x = 0;
|
||||
edited_shape_coord.y++;
|
||||
}
|
||||
|
@ -2211,15 +2213,13 @@ void TileSetEditor::_select_previous_subtile() {
|
|||
} else if (edit_mode == EDITMODE_REGION || edit_mode == EDITMODE_BITMASK || edit_mode == EDITMODE_ICON) {
|
||||
_select_previous_tile();
|
||||
} else {
|
||||
int spacing = tileset->autotile_get_spacing(get_current_tile());
|
||||
Vector2 size = tileset->tile_get_region(get_current_tile()).size;
|
||||
Vector2 cell_count = (size / (tileset->autotile_get_size(get_current_tile()) + Vector2(spacing, spacing))).floor();
|
||||
Vector2 cell_count = _get_subtiles_count(get_current_tile());
|
||||
if (edited_shape_coord.x <= 0 && edited_shape_coord.y <= 0) {
|
||||
_select_previous_tile();
|
||||
} else {
|
||||
edited_shape_coord.x--;
|
||||
if (edited_shape_coord.x == -1) {
|
||||
edited_shape_coord.x = cell_count.x;
|
||||
if (edited_shape_coord.x < 0) {
|
||||
edited_shape_coord.x = cell_count.x - 1;
|
||||
edited_shape_coord.y--;
|
||||
}
|
||||
_select_edited_shape_coord();
|
||||
|
@ -3336,9 +3336,10 @@ void TileSetEditor::update_workspace_minsize() {
|
|||
}
|
||||
}
|
||||
|
||||
workspace->set_custom_minimum_size(workspace_min_size + WORKSPACE_MARGIN * 2);
|
||||
workspace_container->set_custom_minimum_size(workspace_min_size * workspace->get_scale() + WORKSPACE_MARGIN * 2);
|
||||
workspace_overlay->set_custom_minimum_size(workspace_min_size * workspace->get_scale() + WORKSPACE_MARGIN * 2);
|
||||
// Make sure workspace size is initialized last (otherwise it might be incorrect).
|
||||
workspace->call_deferred("set_custom_minimum_size", workspace_min_size + WORKSPACE_MARGIN * 2);
|
||||
}
|
||||
|
||||
void TileSetEditor::update_edited_region(const Vector2 &end_point) {
|
||||
|
|
|
@ -215,6 +215,7 @@ private:
|
|||
void _select_previous_tile();
|
||||
Array _get_tiles_in_current_texture(bool sorted = false);
|
||||
bool _sort_tiles(Variant p_a, Variant p_b);
|
||||
Vector2 _get_subtiles_count(int p_tile_id);
|
||||
void _select_next_subtile();
|
||||
void _select_previous_subtile();
|
||||
void _select_next_shape();
|
||||
|
|
|
@ -1174,11 +1174,13 @@ ProjectExportDialog::ProjectExportDialog() {
|
|||
export_debug = memnew(CheckBox);
|
||||
export_debug->set_text(TTR("Export With Debug"));
|
||||
export_debug->set_pressed(true);
|
||||
export_debug->set_h_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
export_project->get_vbox()->add_child(export_debug);
|
||||
|
||||
export_pck_zip_debug = memnew(CheckBox);
|
||||
export_pck_zip_debug->set_text(TTR("Export With Debug"));
|
||||
export_pck_zip_debug->set_pressed(true);
|
||||
export_pck_zip_debug->set_h_size_flags(Control::SIZE_SHRINK_CENTER);
|
||||
export_pck_zip->get_vbox()->add_child(export_pck_zip_debug);
|
||||
|
||||
set_hide_on_ok(false);
|
||||
|
|
|
@ -76,6 +76,11 @@ bool InputDefault::is_key_pressed(int p_scancode) const {
|
|||
return keys_pressed.has(p_scancode);
|
||||
}
|
||||
|
||||
bool InputDefault::is_physical_key_pressed(int p_scancode) const {
|
||||
_THREAD_SAFE_METHOD_
|
||||
return physical_keys_pressed.has(p_scancode);
|
||||
}
|
||||
|
||||
bool InputDefault::is_mouse_button_pressed(int p_button) const {
|
||||
_THREAD_SAFE_METHOD_
|
||||
return (mouse_button_mask & (1 << (p_button - 1))) != 0;
|
||||
|
@ -316,6 +321,13 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool
|
|||
keys_pressed.erase(k->get_scancode());
|
||||
}
|
||||
}
|
||||
if (k.is_valid() && !k->is_echo() && k->get_physical_scancode() != 0) {
|
||||
if (k->is_pressed()) {
|
||||
physical_keys_pressed.insert(k->get_physical_scancode());
|
||||
} else {
|
||||
physical_keys_pressed.erase(k->get_physical_scancode());
|
||||
}
|
||||
}
|
||||
|
||||
Ref<InputEventMouseButton> mb = p_event;
|
||||
|
||||
|
@ -716,6 +728,7 @@ void InputDefault::release_pressed_events() {
|
|||
flush_buffered_events(); // this is needed to release actions strengths
|
||||
|
||||
keys_pressed.clear();
|
||||
physical_keys_pressed.clear();
|
||||
joy_buttons_pressed.clear();
|
||||
_joy_axis.clear();
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ class InputDefault : public Input {
|
|||
|
||||
int mouse_button_mask;
|
||||
|
||||
Set<int> physical_keys_pressed;
|
||||
Set<int> keys_pressed;
|
||||
Set<int> joy_buttons_pressed;
|
||||
Map<int, float> _joy_axis;
|
||||
|
@ -221,6 +222,7 @@ protected:
|
|||
|
||||
public:
|
||||
virtual bool is_key_pressed(int p_scancode) const;
|
||||
virtual bool is_physical_key_pressed(int p_scancode) const;
|
||||
virtual bool is_mouse_button_pressed(int p_button) const;
|
||||
virtual bool is_joy_button_pressed(int p_device, int p_button) const;
|
||||
virtual bool is_action_pressed(const StringName &p_action, bool p_exact = false) const;
|
||||
|
|
|
@ -175,8 +175,11 @@ static String get_full_version_string() {
|
|||
// FIXME: Could maybe be moved to PhysicsServerManager and Physics2DServerManager directly
|
||||
// to have less code in main.cpp.
|
||||
void initialize_physics() {
|
||||
// This must be defined BEFORE the 3d physics server is created
|
||||
// This must be defined BEFORE the 3d physics server is created,
|
||||
// otherwise it won't always show up in the project settings page.
|
||||
GLOBAL_DEF("physics/3d/godot_physics/use_bvh", true);
|
||||
GLOBAL_DEF("physics/3d/godot_physics/bvh_collision_margin", 0.1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/3d/godot_physics/bvh_collision_margin", PropertyInfo(Variant::REAL, "physics/3d/godot_physics/bvh_collision_margin", PROPERTY_HINT_RANGE, "0.0,2.0,0.01"));
|
||||
|
||||
/// 3D Physics Server
|
||||
physics_server = PhysicsServerManager::new_server(ProjectSettings::get_singleton()->get(PhysicsServerManager::setting_property_name));
|
||||
|
|
|
@ -14,7 +14,7 @@ DELETE_OLD_PATCHES=false
|
|||
|
||||
# File types to parse.
|
||||
FILE_NAMES="SConstruct SCsub"
|
||||
FILE_EXTS="py"
|
||||
FILE_EXTS=".py"
|
||||
|
||||
# Use pygmentize instead of cat to parse diff with highlighting.
|
||||
# Install it with `pip install pygments` (Linux) or `easy_install Pygments` (Mac)
|
||||
|
|
|
@ -259,9 +259,9 @@
|
|||
- 1.0: Linear
|
||||
- Between -1.0 and 0.0 (exclusive): Ease out-in
|
||||
- 0.0: Constant
|
||||
- Between 0.0 to 1.0 (exclusive): Ease in
|
||||
- Between 0.0 to 1.0 (exclusive): Ease out
|
||||
- 1.0: Linear
|
||||
- Greater than 1.0 (exclusive): Ease out
|
||||
- Greater than 1.0 (exclusive): Ease in
|
||||
[/codeblock]
|
||||
[url=https://raw.githubusercontent.com/godotengine/godot-docs/3.4/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
|
||||
See also [method smoothstep]. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer].
|
||||
|
|
|
@ -6068,7 +6068,10 @@ void GLTFDocument::_convert_mesh_instances(Ref<GLTFState> state) {
|
|||
int bone_cnt = skeleton->get_bone_count();
|
||||
ERR_FAIL_COND(bone_cnt != gltf_skeleton->joints.size());
|
||||
|
||||
ObjectID gltf_skin_key = skin->get_instance_id();
|
||||
ObjectID gltf_skin_key = 0;
|
||||
if (skin.is_valid()) {
|
||||
gltf_skin_key = skin->get_instance_id();
|
||||
}
|
||||
ObjectID gltf_skel_key = godot_skeleton->get_instance_id();
|
||||
GLTFSkinIndex skin_gltf_i = -1;
|
||||
GLTFNodeIndex root_gltf_i = -1;
|
||||
|
|
|
@ -755,9 +755,9 @@ void EditorExportPlatformAndroid::_get_permissions(const Ref<EditorExportPreset>
|
|||
}
|
||||
|
||||
int xr_mode_index = p_preset->get("xr_features/xr_mode");
|
||||
if (xr_mode_index == 1 /* XRMode.OVR */) {
|
||||
if (xr_mode_index == XR_MODE_OVR || xr_mode_index == XR_MODE_OPENXR) {
|
||||
int hand_tracking_index = p_preset->get("xr_features/hand_tracking"); // 0: none, 1: optional, 2: required
|
||||
if (hand_tracking_index > 0) {
|
||||
if (hand_tracking_index > XR_HAND_TRACKING_NONE) {
|
||||
if (r_permissions.find("com.oculus.permission.HAND_TRACKING") == -1) {
|
||||
r_permissions.push_back("com.oculus.permission.HAND_TRACKING");
|
||||
}
|
||||
|
@ -976,14 +976,14 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
|
|||
|
||||
if (tname == "meta-data" && attrname == "name" && value == "xr_mode_metadata_name") {
|
||||
// Update the meta-data 'android:name' attribute based on the selected XR mode.
|
||||
if (xr_mode_index == 1 /* XRMode.OVR */) {
|
||||
if (xr_mode_index == XR_MODE_OVR || xr_mode_index == XR_MODE_OPENXR) {
|
||||
string_table.write[attr_value] = "com.samsung.android.vr.application.mode";
|
||||
}
|
||||
}
|
||||
|
||||
if (tname == "meta-data" && attrname == "value" && value == "xr_mode_metadata_value") {
|
||||
// Update the meta-data 'android:value' attribute based on the selected XR mode.
|
||||
if (xr_mode_index == 1 /* XRMode.OVR */) {
|
||||
if (xr_mode_index == XR_MODE_OVR || xr_mode_index == XR_MODE_OPENXR) {
|
||||
string_table.write[attr_value] = "vr_only";
|
||||
}
|
||||
}
|
||||
|
@ -1002,7 +1002,7 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
|
|||
Vector<bool> feature_required_list;
|
||||
Vector<int> feature_versions;
|
||||
|
||||
if (xr_mode_index == 1 /* XRMode.OVR */) {
|
||||
if (xr_mode_index == XR_MODE_OVR || xr_mode_index == XR_MODE_OPENXR) {
|
||||
// Set degrees of freedom
|
||||
feature_names.push_back("android.hardware.vr.headtracking");
|
||||
feature_required_list.push_back(true);
|
||||
|
@ -1010,11 +1010,21 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
|
|||
|
||||
// Check for hand tracking
|
||||
int hand_tracking_index = p_preset->get("xr_features/hand_tracking"); // 0: none, 1: optional, 2: required
|
||||
if (hand_tracking_index > 0) {
|
||||
if (hand_tracking_index > XR_HAND_TRACKING_NONE) {
|
||||
feature_names.push_back("oculus.software.handtracking");
|
||||
feature_required_list.push_back(hand_tracking_index == 2);
|
||||
feature_required_list.push_back(hand_tracking_index == XR_HAND_TRACKING_REQUIRED);
|
||||
feature_versions.push_back(-1); // no version attribute should be added.
|
||||
}
|
||||
|
||||
if (xr_mode_index == XR_MODE_OPENXR) {
|
||||
// Check for passthrough
|
||||
int passthrough_mode = p_preset->get("xr_features/passthrough");
|
||||
if (passthrough_mode > XR_PASSTHROUGH_NONE) {
|
||||
feature_names.push_back("com.oculus.feature.PASSTHROUGH");
|
||||
feature_required_list.push_back(passthrough_mode == XR_PASSTHROUGH_REQUIRED);
|
||||
feature_versions.push_back(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (feature_names.size() > 0) {
|
||||
|
@ -1694,8 +1704,9 @@ void EditorExportPlatformAndroid::get_export_options(List<ExportOption> *r_optio
|
|||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "graphics/32_bits_framebuffer"), true));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "graphics/opengl_debug"), false));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/xr_mode", PROPERTY_HINT_ENUM, "Regular,Oculus Mobile VR"), 0));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/xr_mode", PROPERTY_HINT_ENUM, "Regular,Oculus Mobile VrApi (Deprecated),OpenXR"), 0));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/hand_tracking", PROPERTY_HINT_ENUM, "None,Optional,Required"), 0));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "xr_features/passthrough", PROPERTY_HINT_ENUM, "None,Optional,Required"), 0));
|
||||
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/immersive_mode"), true));
|
||||
r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "screen/support_small"), true));
|
||||
|
@ -2184,10 +2195,19 @@ bool EditorExportPlatformAndroid::can_export(const Ref<EditorExportPreset> &p_pr
|
|||
// Validate the Xr features are properly populated
|
||||
int xr_mode_index = p_preset->get("xr_features/xr_mode");
|
||||
int hand_tracking = p_preset->get("xr_features/hand_tracking");
|
||||
if (xr_mode_index != /* XRMode.OVR*/ 1) {
|
||||
if (hand_tracking > 0) {
|
||||
int passthrough_mode = p_preset->get("xr_features/passthrough");
|
||||
if (xr_mode_index != XR_MODE_OVR && xr_mode_index != XR_MODE_OPENXR) {
|
||||
if (hand_tracking > XR_HAND_TRACKING_NONE) {
|
||||
valid = false;
|
||||
err += TTR("\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VR\".");
|
||||
err += TTR("\"Hand Tracking\" is only valid when \"Xr Mode\" is \"Oculus Mobile VrApi\" or \"OpenXR\".");
|
||||
err += "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (xr_mode_index != XR_MODE_OPENXR) {
|
||||
if (passthrough_mode > XR_PASSTHROUGH_NONE) {
|
||||
valid = false;
|
||||
err += TTR("\"Passthrough\" is only valid when \"Xr Mode\" is \"OpenXR\".");
|
||||
err += "\n";
|
||||
}
|
||||
}
|
||||
|
@ -2524,8 +2544,10 @@ void EditorExportPlatformAndroid::get_command_line_flags(const Ref<EditorExportP
|
|||
}
|
||||
|
||||
int xr_mode_index = p_preset->get("xr_features/xr_mode");
|
||||
if (xr_mode_index == 1) {
|
||||
if (xr_mode_index == XR_MODE_OVR) {
|
||||
command_line_strings.push_back("--xr_mode_ovr");
|
||||
} else if (xr_mode_index == XR_MODE_OPENXR) {
|
||||
command_line_strings.push_back("--xr_mode_openxr");
|
||||
} else { // XRMode.REGULAR is the default.
|
||||
command_line_strings.push_back("--xr_mode_regular");
|
||||
}
|
||||
|
|
|
@ -211,16 +211,24 @@ String _get_screen_sizes_tag(const Ref<EditorExportPreset> &p_preset) {
|
|||
|
||||
String _get_xr_features_tag(const Ref<EditorExportPreset> &p_preset) {
|
||||
String manifest_xr_features;
|
||||
bool uses_xr = (int)(p_preset->get("xr_features/xr_mode")) == 1;
|
||||
int xr_mode_index = (int)(p_preset->get("xr_features/xr_mode"));
|
||||
bool uses_xr = xr_mode_index == XR_MODE_OVR || xr_mode_index == XR_MODE_OPENXR;
|
||||
if (uses_xr) {
|
||||
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"android.hardware.vr.headtracking\" android:required=\"true\" android:version=\"1\" />\n";
|
||||
|
||||
int hand_tracking_index = p_preset->get("xr_features/hand_tracking"); // 0: none, 1: optional, 2: required
|
||||
if (hand_tracking_index == 1) {
|
||||
if (hand_tracking_index == XR_HAND_TRACKING_OPTIONAL) {
|
||||
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"oculus.software.handtracking\" android:required=\"false\" />\n";
|
||||
} else if (hand_tracking_index == 2) {
|
||||
} else if (hand_tracking_index == XR_HAND_TRACKING_REQUIRED) {
|
||||
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"oculus.software.handtracking\" android:required=\"true\" />\n";
|
||||
}
|
||||
|
||||
int passthrough_mode = p_preset->get("xr_features/passthrough");
|
||||
if (passthrough_mode == XR_PASSTHROUGH_OPTIONAL) {
|
||||
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"com.oculus.feature.PASSTHROUGH\" android:required=\"false\" />\n";
|
||||
} else if (passthrough_mode == XR_PASSTHROUGH_REQUIRED) {
|
||||
manifest_xr_features += " <uses-feature tools:node=\"replace\" android:name=\"com.oculus.feature.PASSTHROUGH\" android:required=\"true\" />\n";
|
||||
}
|
||||
}
|
||||
return manifest_xr_features;
|
||||
}
|
||||
|
@ -239,7 +247,8 @@ String _get_instrumentation_tag(const Ref<EditorExportPreset> &p_preset) {
|
|||
}
|
||||
|
||||
String _get_activity_tag(const Ref<EditorExportPreset> &p_preset) {
|
||||
bool uses_xr = (int)(p_preset->get("xr_features/xr_mode")) == 1;
|
||||
int xr_mode_index = (int)(p_preset->get("xr_features/xr_mode"));
|
||||
bool uses_xr = xr_mode_index == XR_MODE_OVR || xr_mode_index == XR_MODE_OPENXR;
|
||||
String orientation = _get_android_orientation_label(
|
||||
OS::get_singleton()->get_screen_orientation_from_string(GLOBAL_GET("display/window/handheld/orientation")));
|
||||
String manifest_activity_text = vformat(
|
||||
|
@ -257,7 +266,8 @@ String _get_activity_tag(const Ref<EditorExportPreset> &p_preset) {
|
|||
}
|
||||
|
||||
String _get_application_tag(const Ref<EditorExportPreset> &p_preset, bool p_has_storage_permission) {
|
||||
bool uses_xr = (int)(p_preset->get("xr_features/xr_mode")) == 1;
|
||||
int xr_mode_index = (int)(p_preset->get("xr_features/xr_mode"));
|
||||
bool uses_xr = xr_mode_index == XR_MODE_OVR || xr_mode_index == XR_MODE_OPENXR;
|
||||
String manifest_application_text = vformat(
|
||||
" <application android:label=\"@string/godot_project_name_string\"\n"
|
||||
" android:allowBackup=\"%s\"\n"
|
||||
|
|
|
@ -44,6 +44,22 @@ const String godot_project_name_xml_string = R"(<?xml version="1.0" encoding="ut
|
|||
</resources>
|
||||
)";
|
||||
|
||||
// Supported XR modes.
|
||||
// This should match the entries in 'platform/android/java/lib/src/org/godotengine/godot/xr/XRMode.java'
|
||||
static const int XR_MODE_REGULAR = 0;
|
||||
static const int XR_MODE_OVR = 1;
|
||||
static const int XR_MODE_OPENXR = 2;
|
||||
|
||||
// Supported XR hand tracking modes.
|
||||
static const int XR_HAND_TRACKING_NONE = 0;
|
||||
static const int XR_HAND_TRACKING_OPTIONAL = 1;
|
||||
static const int XR_HAND_TRACKING_REQUIRED = 2;
|
||||
|
||||
// Supported XR passthrough modes.
|
||||
static const int XR_PASSTHROUGH_NONE = 0;
|
||||
static const int XR_PASSTHROUGH_OPTIONAL = 1;
|
||||
static const int XR_PASSTHROUGH_REQUIRED = 2;
|
||||
|
||||
struct CustomExportData {
|
||||
String assets_directory;
|
||||
bool debug;
|
||||
|
|
|
@ -609,6 +609,8 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
|||
xrMode = XRMode.REGULAR;
|
||||
} else if (command_line[i].equals(XRMode.OVR.cmdLineArg)) {
|
||||
xrMode = XRMode.OVR;
|
||||
} else if (command_line[i].equals(XRMode.OPENXR.cmdLineArg)) {
|
||||
xrMode = XRMode.OPENXR;
|
||||
} else if (command_line[i].equals("--use_depth_32")) {
|
||||
use_32_bits = true;
|
||||
} else if (command_line[i].equals("--debug_opengl")) {
|
||||
|
|
|
@ -285,10 +285,37 @@ public class GodotIO {
|
|||
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_USER);
|
||||
} break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public int getScreenOrientation() {
|
||||
return activity.getRequestedOrientation();
|
||||
int orientation = activity.getRequestedOrientation();
|
||||
switch (orientation) {
|
||||
case ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE:
|
||||
return SCREEN_LANDSCAPE;
|
||||
case ActivityInfo.SCREEN_ORIENTATION_PORTRAIT:
|
||||
return SCREEN_PORTRAIT;
|
||||
case ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE:
|
||||
return SCREEN_REVERSE_LANDSCAPE;
|
||||
case ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT:
|
||||
return SCREEN_REVERSE_PORTRAIT;
|
||||
case ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE:
|
||||
case ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE:
|
||||
return SCREEN_SENSOR_LANDSCAPE;
|
||||
case ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT:
|
||||
case ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT:
|
||||
return SCREEN_SENSOR_PORTRAIT;
|
||||
case ActivityInfo.SCREEN_ORIENTATION_SENSOR:
|
||||
case ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR:
|
||||
case ActivityInfo.SCREEN_ORIENTATION_FULL_USER:
|
||||
return SCREEN_SENSOR;
|
||||
case ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED:
|
||||
case ActivityInfo.SCREEN_ORIENTATION_USER:
|
||||
case ActivityInfo.SCREEN_ORIENTATION_BEHIND:
|
||||
case ActivityInfo.SCREEN_ORIENTATION_NOSENSOR:
|
||||
case ActivityInfo.SCREEN_ORIENTATION_LOCKED:
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public void setEdit(GodotEditText _edit) {
|
||||
|
|
|
@ -122,6 +122,7 @@ public class GodotView extends GLSurfaceView {
|
|||
setFocusableInTouchMode(true);
|
||||
switch (xrMode) {
|
||||
case OVR:
|
||||
case OPENXR:
|
||||
// Replace the default egl config chooser.
|
||||
setEGLConfigChooser(new OvrConfigChooser());
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ package org.godotengine.godot.xr;
|
|||
*/
|
||||
public enum XRMode {
|
||||
REGULAR(0, "Regular", "--xr_mode_regular", "Default Android Gamepad"), // Regular/flatscreen
|
||||
OVR(1, "Oculus Mobile VR", "--xr_mode_ovr", "");
|
||||
OVR(1, "Oculus Mobile VrApi (Deprecated)", "--xr_mode_ovr", ""),
|
||||
OPENXR(2, "OpenXR", "--xr_mode_openxr", "");
|
||||
|
||||
final int index;
|
||||
final String label;
|
||||
|
|
|
@ -466,6 +466,7 @@ void OS_Android::set_screen_orientation(ScreenOrientation p_orientation) {
|
|||
|
||||
OS::ScreenOrientation OS_Android::get_screen_orientation() const {
|
||||
const int orientation = godot_io_java->get_screen_orientation();
|
||||
ERR_FAIL_INDEX_V_MSG(orientation, 7, OS::ScreenOrientation(0), "Unrecognized screen orientation.");
|
||||
return OS::ScreenOrientation(orientation);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,10 +104,14 @@ const GodotInputGamepads = {
|
|||
}
|
||||
}
|
||||
GodotEventListeners.add(window, 'gamepadconnected', function (evt) {
|
||||
add(evt.gamepad);
|
||||
if (evt.gamepad) {
|
||||
add(evt.gamepad);
|
||||
}
|
||||
}, false);
|
||||
GodotEventListeners.add(window, 'gamepaddisconnected', function (evt) {
|
||||
onchange(evt.gamepad.index, 0);
|
||||
if (evt.gamepad) {
|
||||
onchange(evt.gamepad.index, 0);
|
||||
}
|
||||
}, false);
|
||||
},
|
||||
|
||||
|
@ -389,6 +393,9 @@ const GodotInput = {
|
|||
const rect = canvas.getBoundingClientRect();
|
||||
const pos = GodotInput.computePosition(evt, rect);
|
||||
const modifiers = GodotInput.getModifiers(evt);
|
||||
if (p_pressed && document.activeElement !== GodotConfig.canvas) {
|
||||
GodotConfig.canvas.focus();
|
||||
}
|
||||
if (func(p_pressed, evt.button, pos[0], pos[1], modifiers)) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
|
@ -405,6 +412,9 @@ const GodotInput = {
|
|||
const func = GodotRuntime.get_func(callback);
|
||||
const canvas = GodotConfig.canvas;
|
||||
function touch_cb(type, evt) {
|
||||
if (type === 0 && document.activeElement !== GodotConfig.canvas) {
|
||||
GodotConfig.canvas.focus();
|
||||
}
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
const touches = evt.changedTouches;
|
||||
for (let i = 0; i < touches.length; i++) {
|
||||
|
|
|
@ -66,6 +66,7 @@ void joypad::free() {
|
|||
if (ff_device) {
|
||||
FFDeviceReleaseEffect(ff_device, ff_object);
|
||||
FFReleaseDevice(ff_device);
|
||||
ff_device = nullptr;
|
||||
memfree(ff_axes);
|
||||
memfree(ff_directions);
|
||||
}
|
||||
|
@ -250,7 +251,7 @@ void JoypadOSX::_device_added(IOReturn p_res, IOHIDDeviceRef p_device) {
|
|||
if (is_joypad(p_device)) {
|
||||
configure_joypad(p_device, &new_joypad);
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
|
||||
if (IOHIDDeviceGetService != NULL) {
|
||||
if (IOHIDDeviceGetService) {
|
||||
#endif
|
||||
const io_service_t ioservice = IOHIDDeviceGetService(p_device);
|
||||
if ((ioservice) && (FFIsForceFeedback(ioservice) == FF_OK) && new_joypad.config_force_feedback(ioservice)) {
|
||||
|
@ -355,6 +356,7 @@ bool JoypadOSX::configure_joypad(IOHIDDeviceRef p_device_ref, joypad *p_joy) {
|
|||
{ \
|
||||
if (ret != FF_OK) { \
|
||||
FFReleaseDevice(ff_device); \
|
||||
ff_device = nullptr; \
|
||||
return false; \
|
||||
} \
|
||||
}
|
||||
|
@ -374,6 +376,7 @@ bool joypad::config_force_feedback(io_service_t p_service) {
|
|||
return true;
|
||||
}
|
||||
FFReleaseDevice(ff_device);
|
||||
ff_device = nullptr;
|
||||
return false;
|
||||
}
|
||||
#undef FF_ERR
|
||||
|
@ -608,7 +611,7 @@ JoypadOSX::JoypadOSX() {
|
|||
|
||||
if (array) {
|
||||
hid_manager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
|
||||
if (hid_manager != NULL) {
|
||||
if (hid_manager) {
|
||||
config_hid_manager(array);
|
||||
}
|
||||
CFRelease(array);
|
||||
|
|
|
@ -66,14 +66,14 @@ struct joypad {
|
|||
int id = 0;
|
||||
bool offset_hat = false;
|
||||
|
||||
io_service_t ffservice; /* Interface for force feedback, 0 = no ff */
|
||||
io_service_t ffservice = 0; /* Interface for force feedback, 0 = no ff */
|
||||
FFCONSTANTFORCE ff_constant_force;
|
||||
FFDeviceObjectReference ff_device;
|
||||
FFEffectObjectReference ff_object;
|
||||
uint64_t ff_timestamp;
|
||||
LONG *ff_directions;
|
||||
FFDeviceObjectReference ff_device = nullptr;
|
||||
FFEffectObjectReference ff_object = nullptr;
|
||||
uint64_t ff_timestamp = 0;
|
||||
LONG *ff_directions = nullptr;
|
||||
FFEFFECT ff_effect;
|
||||
DWORD *ff_axes;
|
||||
DWORD *ff_axes = nullptr;
|
||||
|
||||
void add_hid_elements(CFArrayRef p_array);
|
||||
void add_hid_element(IOHIDElementRef p_element);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
/*************************************************************************/
|
||||
|
||||
#include "multimesh_instance_2d.h"
|
||||
#include "core/core_string_names.h"
|
||||
|
||||
void MultiMeshInstance2D::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_DRAW) {
|
||||
|
@ -56,7 +57,16 @@ void MultiMeshInstance2D::_bind_methods() {
|
|||
}
|
||||
|
||||
void MultiMeshInstance2D::set_multimesh(const Ref<MultiMesh> &p_multimesh) {
|
||||
// Cleanup previous connection if any.
|
||||
if (multimesh.is_valid()) {
|
||||
multimesh->disconnect(CoreStringNames::get_singleton()->changed, this, "update");
|
||||
}
|
||||
multimesh = p_multimesh;
|
||||
|
||||
// Connect to the multimesh so the AABB can update when instance transforms are changed.
|
||||
if (multimesh.is_valid()) {
|
||||
multimesh->connect(CoreStringNames::get_singleton()->changed, this, "update");
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
|
@ -7176,6 +7176,8 @@ void TextEdit::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("is_drawing_tabs"), &TextEdit::is_drawing_tabs);
|
||||
ClassDB::bind_method(D_METHOD("set_draw_spaces"), &TextEdit::set_draw_spaces);
|
||||
ClassDB::bind_method(D_METHOD("is_drawing_spaces"), &TextEdit::is_drawing_spaces);
|
||||
ClassDB::bind_method(D_METHOD("set_bookmark_gutter_enabled", "enable"), &TextEdit::set_bookmark_gutter_enabled);
|
||||
ClassDB::bind_method(D_METHOD("is_bookmark_gutter_enabled"), &TextEdit::is_bookmark_gutter_enabled);
|
||||
ClassDB::bind_method(D_METHOD("set_breakpoint_gutter_enabled", "enable"), &TextEdit::set_breakpoint_gutter_enabled);
|
||||
ClassDB::bind_method(D_METHOD("is_breakpoint_gutter_enabled"), &TextEdit::is_breakpoint_gutter_enabled);
|
||||
ClassDB::bind_method(D_METHOD("set_draw_fold_gutter"), &TextEdit::set_draw_fold_gutter);
|
||||
|
@ -7237,6 +7239,7 @@ void TextEdit::_bind_methods() {
|
|||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "show_line_numbers"), "set_show_line_numbers", "is_show_line_numbers_enabled");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_tabs"), "set_draw_tabs", "is_drawing_tabs");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_spaces"), "set_draw_spaces", "is_drawing_spaces");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bookmark_gutter"), "set_bookmark_gutter_enabled", "is_bookmark_gutter_enabled");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "breakpoint_gutter"), "set_breakpoint_gutter_enabled", "is_breakpoint_gutter_enabled");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fold_gutter"), "set_draw_fold_gutter", "is_drawing_fold_gutter");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "highlight_all_occurrences"), "set_highlight_all_occurrences", "is_highlight_all_occurrences_enabled");
|
||||
|
|
|
@ -80,6 +80,14 @@ bool SceneTreeTimer::is_pause_mode_process() {
|
|||
return process_pause;
|
||||
}
|
||||
|
||||
void SceneTreeTimer::set_ignore_time_scale(bool p_ignore) {
|
||||
ignore_time_scale = p_ignore;
|
||||
}
|
||||
|
||||
bool SceneTreeTimer::is_ignore_time_scale() {
|
||||
return ignore_time_scale;
|
||||
}
|
||||
|
||||
void SceneTreeTimer::release_connections() {
|
||||
List<Connection> connections;
|
||||
get_all_signal_connections(&connections);
|
||||
|
@ -557,8 +565,13 @@ bool SceneTree::idle(float p_time) {
|
|||
E = N;
|
||||
continue;
|
||||
}
|
||||
|
||||
float time_left = E->get()->get_time_left();
|
||||
time_left -= p_time;
|
||||
if (E->get()->is_ignore_time_scale()) {
|
||||
time_left -= Engine::get_singleton()->get_idle_frame_step();
|
||||
} else {
|
||||
time_left -= p_time;
|
||||
}
|
||||
E->get()->set_time_left(time_left);
|
||||
|
||||
if (time_left < 0) {
|
||||
|
|
|
@ -50,6 +50,7 @@ class SceneTreeTimer : public Reference {
|
|||
|
||||
float time_left;
|
||||
bool process_pause;
|
||||
bool ignore_time_scale = false;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
@ -61,6 +62,9 @@ public:
|
|||
void set_pause_mode_process(bool p_pause_mode_process);
|
||||
bool is_pause_mode_process();
|
||||
|
||||
void set_ignore_time_scale(bool p_ignore);
|
||||
bool is_ignore_time_scale();
|
||||
|
||||
void release_connections();
|
||||
|
||||
SceneTreeTimer();
|
||||
|
|
|
@ -333,7 +333,6 @@ void Viewport::_notification(int p_what) {
|
|||
#endif
|
||||
|
||||
// Enable processing for tooltips, collision debugging, physics object picking, etc.
|
||||
set_process_internal(true);
|
||||
set_physics_process_internal(true);
|
||||
|
||||
} break;
|
||||
|
@ -361,16 +360,6 @@ void Viewport::_notification(int p_what) {
|
|||
remove_from_group("_viewports");
|
||||
|
||||
VS::get_singleton()->viewport_set_active(viewport, false);
|
||||
|
||||
} break;
|
||||
case NOTIFICATION_INTERNAL_PROCESS: {
|
||||
if (gui.tooltip_timer >= 0) {
|
||||
gui.tooltip_timer -= get_process_delta_time();
|
||||
if (gui.tooltip_timer < 0) {
|
||||
_gui_show_tooltip();
|
||||
}
|
||||
}
|
||||
|
||||
} break;
|
||||
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
|
||||
if (get_tree()->is_debugging_collisions_hint() && contact_2d_debug.is_valid()) {
|
||||
|
@ -1499,7 +1488,10 @@ void Viewport::_gui_sort_roots() {
|
|||
|
||||
void Viewport::_gui_cancel_tooltip() {
|
||||
gui.tooltip_control = nullptr;
|
||||
gui.tooltip_timer = -1;
|
||||
if (gui.tooltip_timer.is_valid()) {
|
||||
gui.tooltip_timer->release_connections();
|
||||
gui.tooltip_timer = Ref<SceneTreeTimer>();
|
||||
}
|
||||
if (gui.tooltip_popup) {
|
||||
gui.tooltip_popup->queue_delete();
|
||||
gui.tooltip_popup = nullptr;
|
||||
|
@ -2240,9 +2232,15 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
|
|||
}
|
||||
|
||||
if (can_tooltip && !is_tooltip_shown) {
|
||||
if (gui.tooltip_timer.is_valid()) {
|
||||
gui.tooltip_timer->release_connections();
|
||||
gui.tooltip_timer = Ref<SceneTreeTimer>();
|
||||
}
|
||||
gui.tooltip_control = over;
|
||||
gui.tooltip_pos = mpos;
|
||||
gui.tooltip_timer = gui.tooltip_delay;
|
||||
gui.tooltip_timer = get_tree()->create_timer(gui.tooltip_delay);
|
||||
gui.tooltip_timer->set_ignore_time_scale(true);
|
||||
gui.tooltip_timer->connect("timeout", this, "_gui_show_tooltip");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ class Label;
|
|||
class Timer;
|
||||
class Viewport;
|
||||
class CollisionObject;
|
||||
class SceneTreeTimer;
|
||||
|
||||
class ViewportTexture : public Texture {
|
||||
GDCLASS(ViewportTexture, Texture);
|
||||
|
@ -308,7 +309,7 @@ private:
|
|||
bool drag_attempted;
|
||||
Variant drag_data;
|
||||
ObjectID drag_preview_id;
|
||||
float tooltip_timer;
|
||||
Ref<SceneTreeTimer> tooltip_timer;
|
||||
float tooltip_delay;
|
||||
List<Control *> modal_stack;
|
||||
Transform2D focus_inv_xform;
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
/*************************************************************************/
|
||||
|
||||
#include "multimesh.h"
|
||||
|
||||
#include "servers/visual_server.h"
|
||||
|
||||
void MultiMesh::_set_transform_array(const PoolVector<Vector3> &p_array) {
|
||||
|
@ -225,6 +226,7 @@ void MultiMesh::set_instance_transform(int p_instance, const Transform &p_transf
|
|||
|
||||
void MultiMesh::set_instance_transform_2d(int p_instance, const Transform2D &p_transform) {
|
||||
VisualServer::get_singleton()->multimesh_instance_set_transform_2d(multimesh, p_instance, p_transform);
|
||||
emit_changed();
|
||||
}
|
||||
|
||||
Transform MultiMesh::get_instance_transform(int p_instance) const {
|
||||
|
|
|
@ -127,6 +127,7 @@ BroadPhaseSW *BroadPhaseBVH::_create() {
|
|||
|
||||
BroadPhaseBVH::BroadPhaseBVH() {
|
||||
bvh.params_set_thread_safe(GLOBAL_GET("rendering/threads/thread_safe_bvh"));
|
||||
bvh.params_set_pairing_expansion(GLOBAL_GET("physics/3d/godot_physics/bvh_collision_margin"));
|
||||
bvh.set_pair_callback(_pair_callback, this);
|
||||
bvh.set_unpair_callback(_unpair_callback, this);
|
||||
bvh.set_check_pair_callback(_check_pair_callback, this);
|
||||
|
|
|
@ -123,6 +123,7 @@ BroadPhase2DSW *BroadPhase2DBVH::_create() {
|
|||
|
||||
BroadPhase2DBVH::BroadPhase2DBVH() {
|
||||
bvh.params_set_thread_safe(GLOBAL_GET("rendering/threads/thread_safe_bvh"));
|
||||
bvh.params_set_pairing_expansion(GLOBAL_GET("physics/2d/bvh_collision_margin"));
|
||||
bvh.set_pair_callback(_pair_callback, this);
|
||||
bvh.set_unpair_callback(_unpair_callback, this);
|
||||
bvh.set_check_pair_callback(_check_pair_callback, this);
|
||||
|
|
|
@ -1325,6 +1325,8 @@ Physics2DServerSW::Physics2DServerSW() {
|
|||
GLOBAL_DEF("physics/2d/bp_hash_table_size", 4096);
|
||||
GLOBAL_DEF("physics/2d/cell_size", 128);
|
||||
GLOBAL_DEF("physics/2d/large_object_surface_threshold_in_cells", 512);
|
||||
GLOBAL_DEF("physics/2d/bvh_collision_margin", 1.0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("physics/2d/bvh_collision_margin", PropertyInfo(Variant::REAL, "physics/2d/bvh_collision_margin", PROPERTY_HINT_RANGE, "0.0,20.0,0.1"));
|
||||
|
||||
bool use_bvh = GLOBAL_GET("physics/2d/use_bvh");
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ void VisualServerScene::camera_set_use_vertical_aspect(RID p_camera, bool p_enab
|
|||
|
||||
VisualServerScene::SpatialPartitioningScene_BVH::SpatialPartitioningScene_BVH() {
|
||||
_bvh.params_set_thread_safe(GLOBAL_GET("rendering/threads/thread_safe_bvh"));
|
||||
_bvh.params_set_pairing_expansion(GLOBAL_GET("rendering/quality/spatial_partitioning/bvh_collision_margin"));
|
||||
}
|
||||
|
||||
VisualServerScene::SpatialPartitionID VisualServerScene::SpatialPartitioningScene_BVH::create(Instance *p_userdata, const AABB &p_aabb, int p_subindex, bool p_pairable, uint32_t p_pairable_type, uint32_t p_pairable_mask) {
|
||||
|
@ -4095,6 +4096,9 @@ VisualServerScene::VisualServerScene() {
|
|||
render_pass = 1;
|
||||
singleton = this;
|
||||
_use_bvh = GLOBAL_DEF("rendering/quality/spatial_partitioning/use_bvh", true);
|
||||
GLOBAL_DEF("rendering/quality/spatial_partitioning/bvh_collision_margin", 0.1);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/spatial_partitioning/bvh_collision_margin", PropertyInfo(Variant::REAL, "rendering/quality/spatial_partitioning/bvh_collision_margin", PROPERTY_HINT_RANGE, "0.0,2.0,0.01"));
|
||||
|
||||
_visual_server_callbacks = nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -153,14 +153,14 @@ Files extracted from upstream source:
|
|||
## libogg
|
||||
|
||||
- Upstream: https://www.xiph.org/ogg
|
||||
- Version: git (c8fca6b4a02d695b1ceea39b330d4406001c03ed, 2019)
|
||||
- Version: 1.3.5 (e1774cd77f471443541596e09078e78fdc342e4f, 2021)
|
||||
- License: BSD-3-Clause
|
||||
|
||||
Files extracted from upstream source:
|
||||
|
||||
- `src/*.{c,h}`
|
||||
- `include/ogg/*.h` in ogg/
|
||||
- COPYING
|
||||
- `include/ogg/*.h` in `ogg/` (run `configure` to generate `config_types.h`)
|
||||
- `COPYING`
|
||||
|
||||
|
||||
## libpng
|
||||
|
@ -216,14 +216,14 @@ on top of the 1.1.1 source (not included in any stable release yet).
|
|||
## libvorbis
|
||||
|
||||
- Upstream: https://www.xiph.org/vorbis
|
||||
- Version: 1.3.6 (2018)
|
||||
- Version: 1.3.7 (0657aee69dec8508a0011f47f3b69d7538e9d262, 2020)
|
||||
- License: BSD-3-Clause
|
||||
|
||||
Files extracted from upstream source:
|
||||
|
||||
- `src/*` except from: `lookups.pl`, `Makefile.*`
|
||||
- `include/vorbis/*.h` as vorbis/
|
||||
- COPYING
|
||||
- `lib/*` except from: `lookups.pl`, `Makefile.*`
|
||||
- `include/vorbis/*.h` as `vorbis/`
|
||||
- `COPYING`
|
||||
|
||||
|
||||
## libvpx
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
##
|
||||
## Bundle of CA Root Certificates
|
||||
##
|
||||
## Certificate data from Mozilla as of: Mon Jul 5 21:36:52 2021 GMT
|
||||
## Certificate data from Mozilla as of: Mon Nov 1 15:39:58 2021 GMT
|
||||
##
|
||||
## This is a bundle of X.509 certificates of public Certificate Authorities
|
||||
## (CA). These were automatically extracted from Mozilla's root certificates
|
||||
|
@ -14,7 +14,7 @@
|
|||
## Just configure this file as the SSLCACertificateFile.
|
||||
##
|
||||
## Conversion done with mk-ca-bundle.pl version 1.28.
|
||||
## SHA256: c8f6733d1ff4e6a4769c182971a1234f95ae079247a9c439a13423fe8ba5c24f
|
||||
## SHA256: bb36818a81feaa4cca61101e6d6276cd09e972efcb08112dfed846918ca41d7f
|
||||
##
|
||||
|
||||
|
||||
|
@ -381,26 +381,6 @@ mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
|
|||
vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
DST Root CA X3
|
||||
==============
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK
|
||||
ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X
|
||||
DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1
|
||||
cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD
|
||||
ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT
|
||||
rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9
|
||||
UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy
|
||||
xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d
|
||||
utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T
|
||||
AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ
|
||||
MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug
|
||||
dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE
|
||||
GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw
|
||||
RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS
|
||||
fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
SwissSign Gold CA - G2
|
||||
======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
|
@ -2713,7 +2693,8 @@ CBeQyh+KTOgNG3qxrdWBCUfvO6wIBHxcmbHtRwfSAjEAnbpV/KlK6O3t5nYBQnvI+GDZjVGLVTv7
|
|||
jHvrZQnD+JbNR6iC8hZVdyR+EhCVBCyj
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# emSign Root CA - C1
|
||||
emSign Root CA - C1
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDczCCAlugAwIBAgILAK7PALrEzzL4Q7IwDQYJKoZIhvcNAQELBQAwVjELMAkGA1UEBhMCVVMx
|
||||
EzARBgNVBAsTCmVtU2lnbiBQS0kxFDASBgNVBAoTC2VNdWRocmEgSW5jMRwwGgYDVQQDExNlbVNp
|
||||
|
@ -2733,7 +2714,8 @@ wC68AivTxEDkigcxHpvOJpkT+xHqmiIMERnHXhuBUDDIlhJu58tBf5E7oke3VIAb3ADMmpDqw8NQ
|
|||
BmIMMMAVSKeoWXzhriKi4gp6D/piq1JM4fHfyr6DDUI=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# emSign ECC Root CA - C3
|
||||
emSign ECC Root CA - C3
|
||||
=======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICKzCCAbGgAwIBAgIKe3G2gla4EnycqDAKBggqhkjOPQQDAzBaMQswCQYDVQQGEwJVUzETMBEG
|
||||
A1UECxMKZW1TaWduIFBLSTEUMBIGA1UEChMLZU11ZGhyYSBJbmMxIDAeBgNVBAMTF2VtU2lnbiBF
|
||||
|
@ -2747,7 +2729,8 @@ MGUCMQC02C8Cif22TGK6Q04ThHK1rt0c3ta13FaPWEBaLd4gTCKDypOofu4SQMfWh0/434UCMBwU
|
|||
ZOR8loMRnLDRWmFLpg9J0wD8ofzkpf9/rdcw0Md3f76BB1UwUCAU9Vc4CqgxUQ==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Hongkong Post Root CA 3
|
||||
Hongkong Post Root CA 3
|
||||
=======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFzzCCA7egAwIBAgIUCBZfikyl7ADJk0DfxMauI7gcWqQwDQYJKoZIhvcNAQELBQAwbzELMAkG
|
||||
A1UEBhMCSEsxEjAQBgNVBAgTCUhvbmcgS29uZzESMBAGA1UEBxMJSG9uZyBLb25nMRYwFAYDVQQK
|
||||
|
@ -2778,7 +2761,8 @@ hcErulWuBurQB7Lcq9CClnXO0lD+mefPL5/ndtFhKvshuzHQqp9HpLIiyhY6UFfEW0NnxWViA0kB
|
|||
dBb9HxEGmpv0
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Entrust Root Certification Authority - G4
|
||||
Entrust Root Certification Authority - G4
|
||||
=========================================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGSzCCBDOgAwIBAgIRANm1Q3+vqTkPAAAAAFVlrVgwDQYJKoZIhvcNAQELBQAwgb4xCzAJBgNV
|
||||
BAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3Qu
|
||||
|
@ -2811,7 +2795,8 @@ JOgc47OlIQ6SwJAfzyBfyjs4x7dtOvPmRLgOMWuIjnDrnBdSqEGULoe256YSxXXfW8AKbnuk5F6G
|
|||
kcpG2om3PVODLAgfi49T3f+sHw==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Microsoft ECC Root Certificate Authority 2017
|
||||
Microsoft ECC Root Certificate Authority 2017
|
||||
=============================================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICWTCCAd+gAwIBAgIQZvI9r4fei7FK6gxXMQHC7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV
|
||||
UzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQgRUND
|
||||
|
@ -2826,7 +2811,8 @@ Xu5gKcs68tvWMoQZP3zVL8KxzJOuULsJMsbG7X7JNpQS5GiFBqIb0C8CMQCZ6Ra0DvpWSNSkMBaR
|
|||
eNtUjGUBiudQZsIxtzm6uBoiB078a1QWIP8rtedMDE2mT3M=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Microsoft RSA Root Certificate Authority 2017
|
||||
Microsoft RSA Root Certificate Authority 2017
|
||||
=============================================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFqDCCA5CgAwIBAgIQHtOXCV/YtLNHcB6qvn9FszANBgkqhkiG9w0BAQwFADBlMQswCQYDVQQG
|
||||
EwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMTYwNAYDVQQDEy1NaWNyb3NvZnQg
|
||||
|
@ -2856,7 +2842,8 @@ c0QWbej09+CVgI+WXTik9KveCjCHk9hNAHFiRSdLOkKEW39lt2c0Ui2cFmuqqNh7o0JMcccMyj6D
|
|||
5KbvtwEwXlGjefVwaaZBRA+GsCyRxj3qrg+E
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# e-Szigno Root CA 2017
|
||||
e-Szigno Root CA 2017
|
||||
=====================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICQDCCAeWgAwIBAgIMAVRI7yH9l1kN9QQKMAoGCCqGSM49BAMCMHExCzAJBgNVBAYTAkhVMREw
|
||||
DwYDVQQHDAhCdWRhcGVzdDEWMBQGA1UECgwNTWljcm9zZWMgTHRkLjEXMBUGA1UEYQwOVkFUSFUt
|
||||
|
@ -2871,7 +2858,8 @@ tVfd14pVCzbhhkT61NlojbjcI4qKDdQvfepz7L9NbKgCIQDLpbQS+ue16M9+k/zzNY9vTlp8tLxO
|
|||
svxyqltZ+efcMQ==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# certSIGN Root CA G2
|
||||
certSIGN Root CA G2
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFRzCCAy+gAwIBAgIJEQA0tk7GNi02MA0GCSqGSIb3DQEBCwUAMEExCzAJBgNVBAYTAlJPMRQw
|
||||
EgYDVQQKEwtDRVJUU0lHTiBTQTEcMBoGA1UECxMTY2VydFNJR04gUk9PVCBDQSBHMjAeFw0xNzAy
|
||||
|
@ -2899,7 +2887,8 @@ NMn5X7azKFGnpyuqSfqNZSlO42sTp5SjLVFteAxEy9/eCG/Oo2Sr05WE1LlSVHJ7liXMvGnjSG4N
|
|||
0MedJ5qq+BOS3R7fY581qRY27Iy4g/Q9iY/NtBde17MXQRBdJ3NghVdJIgc=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Trustwave Global Certification Authority
|
||||
Trustwave Global Certification Authority
|
||||
========================================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIF2jCCA8KgAwIBAgIMBfcOhtpJ80Y1LrqyMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQGEwJV
|
||||
UzERMA8GA1UECAwISWxsaW5vaXMxEDAOBgNVBAcMB0NoaWNhZ28xITAfBgNVBAoMGFRydXN0d2F2
|
||||
|
@ -2930,7 +2919,8 @@ Yj6RS8fZMXZC+fc8Y+wmjHMMfRod6qh8h6jCJ3zhM0EPz8/8AKAigJ5Kp28AsEFFtyLKaEjFQqKu
|
|||
29FpHOTKyeC2nOnOcXHebD8WpHk=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Trustwave Global ECC P256 Certification Authority
|
||||
Trustwave Global ECC P256 Certification Authority
|
||||
=================================================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICYDCCAgegAwIBAgIMDWpfCD8oXD5Rld9dMAoGCCqGSM49BAMCMIGRMQswCQYDVQQGEwJVUzER
|
||||
MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI
|
||||
|
@ -2945,7 +2935,8 @@ P62jQzBBMA8GA1UdEwEB/wQFMAMBAf8wDwYDVR0PAQH/BAUDAwcGADAdBgNVHQ4EFgQUo0EGrJBt
|
|||
RM4q3wghDDcCIC0mA6AFvWvR9lz4ZcyGbbOcNEhjhAnFjXca4syc4XR7
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Trustwave Global ECC P384 Certification Authority
|
||||
Trustwave Global ECC P384 Certification Authority
|
||||
=================================================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICnTCCAiSgAwIBAgIMCL2Fl2yZJ6SAaEc7MAoGCCqGSM49BAMDMIGRMQswCQYDVQQGEwJVUzER
|
||||
MA8GA1UECBMISWxsaW5vaXMxEDAOBgNVBAcTB0NoaWNhZ28xITAfBgNVBAoTGFRydXN0d2F2ZSBI
|
||||
|
@ -2961,7 +2952,8 @@ ADBkAjA3AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsCMGcl
|
|||
CrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVuSw==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# NAVER Global Root Certification Authority
|
||||
NAVER Global Root Certification Authority
|
||||
=========================================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFojCCA4qgAwIBAgIUAZQwHqIL3fXFMyqxQ0Rx+NZQTQ0wDQYJKoZIhvcNAQEMBQAwaTELMAkG
|
||||
A1UEBhMCS1IxJjAkBgNVBAoMHU5BVkVSIEJVU0lORVNTIFBMQVRGT1JNIENvcnAuMTIwMAYDVQQD
|
||||
|
@ -2991,7 +2983,8 @@ I/hGoiLtk/bdmuYqh7GYVPEi92tF4+KOdh2ajcQGjTa3FPOdVGm3jjzVpG2Tgbet9r1ke8LJaDmg
|
|||
kpzNNIaRkPpkUZ3+/uul9XXeifdy
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# AC RAIZ FNMT-RCM SERVIDORES SEGUROS
|
||||
AC RAIZ FNMT-RCM SERVIDORES SEGUROS
|
||||
===================================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICbjCCAfOgAwIBAgIQYvYybOXE42hcG2LdnC6dlTAKBggqhkjOPQQDAzB4MQswCQYDVQQGEwJF
|
||||
UzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRgwFgYDVQRhDA9WQVRFUy1RMjgy
|
||||
|
@ -3006,7 +2999,8 @@ SM49BAMDA2kAMGYCMQCuSuMrQMN0EfKVrRYj3k4MGuZdpSRea0R7/DjiT8ucRRcRTBQnJlU5dUoD
|
|||
zBOQn5ICMQD6SmxgiHPz7riYYqnOK8LZiqZwMR2vsJRM60/G49HzYqc8/5MuB1xJAWdpEgJyv+c=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# GlobalSign Root R46
|
||||
GlobalSign Root R46
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFWjCCA0KgAwIBAgISEdK7udcjGJ5AXwqdLdDfJWfRMA0GCSqGSIb3DQEBDAUAMEYxCzAJBgNV
|
||||
BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJv
|
||||
|
@ -3035,7 +3029,8 @@ DEJ4Y9HiD2971KE9dJeFt0g5QdYg/NA6s/rob8SKunE3vouXsXgxT7PntgMTzlSdriVZzH81Xwj3
|
|||
QEUxeCp6
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# GlobalSign Root E46
|
||||
GlobalSign Root E46
|
||||
===================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICCzCCAZGgAwIBAgISEdK7ujNu1LzmJGjFDYQdmOhDMAoGCCqGSM49BAMDMEYxCzAJBgNVBAYT
|
||||
AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRwwGgYDVQQDExNHbG9iYWxTaWduIFJvb3Qg
|
||||
|
@ -3049,7 +3044,8 @@ vLtoURMMA/cVi4RguYv/Uo7njLwcAjA8+RHUjE7AwWHCFUyqqx0LMV87HOIAl0Qx5v5zli/altP+
|
|||
CAezNIm8BZ/3Hobui3A=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# GLOBALTRUST 2020
|
||||
GLOBALTRUST 2020
|
||||
================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFgjCCA2qgAwIBAgILWku9WvtPilv6ZeUwDQYJKoZIhvcNAQELBQAwTTELMAkGA1UEBhMCQVQx
|
||||
IzAhBgNVBAoTGmUtY29tbWVyY2UgbW9uaXRvcmluZyBHbWJIMRkwFwYDVQQDExBHTE9CQUxUUlVT
|
||||
|
@ -3078,7 +3074,8 @@ YqYK6miyeUcGbvJXqBUzxvd4Sj1Ce2t+/vdG6tHrju+IaFvowdlxfv1k7/9nR4hYJS8+hge9+6jl
|
|||
gqispdNpQ80xiEmEU5LAsTkbOYMBMMTyqfrQA71yN2BWHzZ8vTmR9W0Nv3vXkg==
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# ANF Secure Server Root CA
|
||||
ANF Secure Server Root CA
|
||||
=========================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIF7zCCA9egAwIBAgIIDdPjvGz5a7EwDQYJKoZIhvcNAQELBQAwgYQxEjAQBgNVBAUTCUc2MzI4
|
||||
NzUxMDELMAkGA1UEBhMCRVMxJzAlBgNVBAoTHkFORiBBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lv
|
||||
|
@ -3109,7 +3106,8 @@ g77FGr8H6lnco4g175x2MjxNBiLOFeXdntiP2t7SxDnlF4HPOEfrf4htWRvfn0IUrn7PqLBmZdo3
|
|||
r5+qPeoott7VMVgWglvquxl1AnMaykgaIZOQCo6ThKd9OyMYkomgjaw=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Certum EC-384 CA
|
||||
Certum EC-384 CA
|
||||
================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICZTCCAeugAwIBAgIQeI8nXIESUiClBNAt3bpz9DAKBggqhkjOPQQDAzB0MQswCQYDVQQGEwJQ
|
||||
TDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2Vy
|
||||
|
@ -3124,7 +3122,8 @@ ADBlAjADVS2m5hjEfO/JUG7BJw+ch69u1RsIGL2SKcHvlJF40jocVYli5RsJHrpka/F2tNQCMQC0
|
|||
QoSZ/6vnnvuRlydd3LBbMHHOXjgaatkl5+r3YZJW+OraNsKHZZYuciUvf9/DE8k=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
# Certum Trusted Root CA
|
||||
Certum Trusted Root CA
|
||||
======================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFwDCCA6igAwIBAgIQHr9ZULjJgDdMBvfrVU+17TANBgkqhkiG9w0BAQ0FADB6MQswCQYDVQQG
|
||||
EwJQTDEhMB8GA1UEChMYQXNzZWNvIERhdGEgU3lzdGVtcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0g
|
||||
|
@ -3153,3 +3152,81 @@ WWRrJ8/vJ8HjJLWG965+Mk2weWjROeiQWMODvA8s1pfrzgzhIMfatz7DP78v3DSk+yshzWePS/Tj
|
|||
OPQD8rv7gmsHINFSH5pkAnuYZttcTVoP0ISVoDwUQwbKytu4QTbaakRnh6+v40URFWkIsr4WOZck
|
||||
bxJF0WddCajJFdr60qZfE2Efv4WstK2tBZQIgx51F9NxO5NQI1mg7TyRVJ12AMXDuDjb
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
TunTrust Root CA
|
||||
================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFszCCA5ugAwIBAgIUEwLV4kBMkkaGFmddtLu7sms+/BMwDQYJKoZIhvcNAQELBQAwYTELMAkG
|
||||
A1UEBhMCVE4xNzA1BgNVBAoMLkFnZW5jZSBOYXRpb25hbGUgZGUgQ2VydGlmaWNhdGlvbiBFbGVj
|
||||
dHJvbmlxdWUxGTAXBgNVBAMMEFR1blRydXN0IFJvb3QgQ0EwHhcNMTkwNDI2MDg1NzU2WhcNNDQw
|
||||
NDI2MDg1NzU2WjBhMQswCQYDVQQGEwJUTjE3MDUGA1UECgwuQWdlbmNlIE5hdGlvbmFsZSBkZSBD
|
||||
ZXJ0aWZpY2F0aW9uIEVsZWN0cm9uaXF1ZTEZMBcGA1UEAwwQVHVuVHJ1c3QgUm9vdCBDQTCCAiIw
|
||||
DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMPN0/y9BFPdDCA61YguBUtB9YOCfvdZn56eY+hz
|
||||
2vYGqU8ftPkLHzmMmiDQfgbU7DTZhrx1W4eI8NLZ1KMKsmwb60ksPqxd2JQDoOw05TDENX37Jk0b
|
||||
bjBU2PWARZw5rZzJJQRNmpA+TkBuimvNKWfGzC3gdOgFVwpIUPp6Q9p+7FuaDmJ2/uqdHYVy7BG7
|
||||
NegfJ7/Boce7SBbdVtfMTqDhuazb1YMZGoXRlJfXyqNlC/M4+QKu3fZnz8k/9YosRxqZbwUN/dAd
|
||||
gjH8KcwAWJeRTIAAHDOFli/LQcKLEITDCSSJH7UP2dl3RxiSlGBcx5kDPP73lad9UKGAwqmDrViW
|
||||
VSHbhlnUr8a83YFuB9tgYv7sEG7aaAH0gxupPqJbI9dkxt/con3YS7qC0lH4Zr8GRuR5KiY2eY8f
|
||||
Tpkdso8MDhz/yV3A/ZAQprE38806JG60hZC/gLkMjNWb1sjxVj8agIl6qeIbMlEsPvLfe/ZdeikZ
|
||||
juXIvTZxi11Mwh0/rViizz1wTaZQmCXcI/m4WEEIcb9PuISgjwBUFfyRbVinljvrS5YnzWuioYas
|
||||
DXxU5mZMZl+QviGaAkYt5IPCgLnPSz7ofzwB7I9ezX/SKEIBlYrilz0QIX32nRzFNKHsLA4KUiwS
|
||||
VXAkPcvCFDVDXSdOvsC9qnyW5/yeYa1E0wCXAgMBAAGjYzBhMB0GA1UdDgQWBBQGmpsfU33x9aTI
|
||||
04Y+oXNZtPdEITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFAaamx9TffH1pMjThj6hc1m0
|
||||
90QhMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAqgVutt0Vyb+zxiD2BkewhpMl
|
||||
0425yAA/l/VSJ4hxyXT968pk21vvHl26v9Hr7lxpuhbI87mP0zYuQEkHDVneixCwSQXi/5E/S7fd
|
||||
Ao74gShczNxtr18UnH1YeA32gAm56Q6XKRm4t+v4FstVEuTGfbvE7Pi1HE4+Z7/FXxttbUcoqgRY
|
||||
YdZ2vyJ/0Adqp2RT8JeNnYA/u8EH22Wv5psymsNUk8QcCMNE+3tjEUPRahphanltkE8pjkcFwRJp
|
||||
adbGNjHh/PqAulxPxOu3Mqz4dWEX1xAZufHSCe96Qp1bWgvUxpVOKs7/B9dPfhgGiPEZtdmYu65x
|
||||
xBzndFlY7wyJz4sfdZMaBBSSSFCp61cpABbjNhzI+L/wM9VBD8TMPN3pM0MBkRArHtG5Xc0yGYuP
|
||||
jCB31yLEQtyEFpslbei0VXF/sHyz03FJuc9SpAQ/3D2gu68zngowYI7bnV2UqL1g52KAdoGDDIzM
|
||||
MEZJ4gzSqK/rYXHv5yJiqfdcZGyfFoxnNidF9Ql7v/YQCvGwjVRDjAS6oz/v4jXH+XTgbzRB0L9z
|
||||
ZVcg+ZtnemZoJE6AZb0QmQZZ8mWvuMZHu/2QeItBcy6vVR/cO5JyboTT0GFMDcx2V+IthSIVNg3r
|
||||
AZ3r2OvEhJn7wAzMMujjd9qDRIueVSjAi1jTkD5OGwDxFa2DK5o=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
HARICA TLS RSA Root CA 2021
|
||||
===========================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFpDCCA4ygAwIBAgIQOcqTHO9D88aOk8f0ZIk4fjANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQG
|
||||
EwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u
|
||||
cyBDQTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTEwNTUz
|
||||
OFoXDTQ1MDIxMzEwNTUzN1owbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRl
|
||||
bWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgUlNB
|
||||
IFJvb3QgQ0EgMjAyMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIvC569lmwVnlskN
|
||||
JLnQDmT8zuIkGCyEf3dRywQRNrhe7Wlxp57kJQmXZ8FHws+RFjZiPTgE4VGC/6zStGndLuwRo0Xu
|
||||
a2s7TL+MjaQenRG56Tj5eg4MmOIjHdFOY9TnuEFE+2uva9of08WRiFukiZLRgeaMOVig1mlDqa2Y
|
||||
Ulhu2wr7a89o+uOkXjpFc5gH6l8Cct4MpbOfrqkdtx2z/IpZ525yZa31MJQjB/OCFks1mJxTuy/K
|
||||
5FrZx40d/JiZ+yykgmvwKh+OC19xXFyuQnspiYHLA6OZyoieC0AJQTPb5lh6/a6ZcMBaD9YThnEv
|
||||
dmn8kN3bLW7R8pv1GmuebxWMevBLKKAiOIAkbDakO/IwkfN4E8/BPzWr8R0RI7VDIp4BkrcYAuUR
|
||||
0YLbFQDMYTfBKnya4dC6s1BG7oKsnTH4+yPiAwBIcKMJJnkVU2DzOFytOOqBAGMUuTNe3QvboEUH
|
||||
GjMJ+E20pwKmafTCWQWIZYVWrkvL4N48fS0ayOn7H6NhStYqE613TBoYm5EPWNgGVMWX+Ko/IIqm
|
||||
haZ39qb8HOLubpQzKoNQhArlT4b4UEV4AIHrW2jjJo3Me1xR9BQsQL4aYB16cmEdH2MtiKrOokWQ
|
||||
CPxrvrNQKlr9qEgYRtaQQJKQCoReaDH46+0N0x3GfZkYVVYnZS6NRcUk7M7jAgMBAAGjQjBAMA8G
|
||||
A1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFApII6ZgpJIKM+qTW8VX6iVNvRLuMA4GA1UdDwEB/wQE
|
||||
AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAPpBIqm5iFSVmewzVjIuJndftTgfvnNAUX15QvWiWkKQU
|
||||
EapobQk1OUAJ2vQJLDSle1mESSmXdMgHHkdt8s4cUCbjnj1AUz/3f5Z2EMVGpdAgS1D0NTsY9FVq
|
||||
QRtHBmg8uwkIYtlfVUKqrFOFrJVWNlar5AWMxajaH6NpvVMPxP/cyuN+8kyIhkdGGvMA9YCRotxD
|
||||
QpSbIPDRzbLrLFPCU3hKTwSUQZqPJzLB5UkZv/HywouoCjkxKLR9YjYsTewfM7Z+d21+UPCfDtcR
|
||||
j88YxeMn/ibvBZ3PzzfF0HvaO7AWhAw6k9a+F9sPPg4ZeAnHqQJyIkv3N3a6dcSFA1pj1bF1BcK5
|
||||
vZStjBWZp5N99sXzqnTPBIWUmAD04vnKJGW/4GKvyMX6ssmeVkjaef2WdhW+o45WxLM0/L5H9MG0
|
||||
qPzVMIho7suuyWPEdr6sOBjhXlzPrjoiUevRi7PzKzMHVIf6tLITe7pTBGIBnfHAT+7hOtSLIBD6
|
||||
Alfm78ELt5BGnBkpjNxvoEppaZS3JGWg/6w/zgH7IS79aPib8qXPMThcFarmlwDB31qlpzmq6YR/
|
||||
PFGoOtmUW4y/Twhx5duoXNTSpv4Ao8YWxw/ogM4cKGR0GQjTQuPOAF1/sdwTsOEFy9EgqoZ0njnn
|
||||
kf3/W9b3raYvAwtt41dU63ZTGI0RmLo=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
HARICA TLS ECC Root CA 2021
|
||||
===========================
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICVDCCAdugAwIBAgIQZ3SdjXfYO2rbIvT/WeK/zjAKBggqhkjOPQQDAzBsMQswCQYDVQQGEwJH
|
||||
UjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBD
|
||||
QTEkMCIGA1UEAwwbSEFSSUNBIFRMUyBFQ0MgUm9vdCBDQSAyMDIxMB4XDTIxMDIxOTExMDExMFoX
|
||||
DTQ1MDIxMzExMDEwOVowbDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWlj
|
||||
IGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExJDAiBgNVBAMMG0hBUklDQSBUTFMgRUNDIFJv
|
||||
b3QgQ0EgMjAyMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABDgI/rGgltJ6rK9JOtDA4MM7KKrxcm1l
|
||||
AEeIhPyaJmuqS7psBAqIXhfyVYf8MLA04jRYVxqEU+kw2anylnTDUR9YSTHMmE5gEYd103KUkE+b
|
||||
ECUqqHgtvpBBWJAVcqeht6NCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUyRtTgRL+BNUW
|
||||
0aq8mm+3oJUZbsowDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMDA2cAMGQCMBHervjcToiwqfAi
|
||||
rcJRQO9gcS3ujwLEXQNwSaSS6sUUiHCm0w2wqsosQJz76YJumgIwK0eaB8bRwoF8yguWGEEbo/Qw
|
||||
CZ61IygNnxS2PFOiTAZpffpskcYqSUXm7LcT4Tps
|
||||
-----END CERTIFICATE-----
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
// #define THROW_RUNTIME_ERROR(str)
|
||||
// throw std::runtime_error(std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str));
|
||||
#define THROW_RUNTIME_ERROR(str) \
|
||||
printf(std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str)), abort();
|
||||
printf("%s (%d): %s", __FILE__, __LINE__, std::string(str).c_str()), abort();
|
||||
// -- GODOT end --
|
||||
#else
|
||||
// -- GODOT start --
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace embree
|
|||
// #define throw_RTCError(error,str) \
|
||||
// throw rtcore_error(error,std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str));
|
||||
#define throw_RTCError(error,str) \
|
||||
printf(std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str)), abort();
|
||||
printf("%s (%d): %s", __FILE__, __LINE__, std::string(str).c_str()), abort();
|
||||
// -- GODOT end --
|
||||
#else
|
||||
// -- GODOT begin --
|
||||
|
|
|
@ -259,7 +259,7 @@ index 8a6d9fa0a9..697e07bb86 100644
|
|||
+ // throw std::runtime_error(std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str));
|
||||
#define THROW_RUNTIME_ERROR(str) \
|
||||
- throw std::runtime_error(std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str));
|
||||
+ printf(std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str)), abort();
|
||||
+ printf("%s (%d): %s", __FILE__, __LINE__, std::string(str).c_str()), abort();
|
||||
+ // -- GODOT end --
|
||||
#else
|
||||
+ // -- GODOT start --
|
||||
|
@ -583,7 +583,7 @@ index 4e4b24e9c2..373e49a689 100644
|
|||
+ // throw rtcore_error(error,std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str));
|
||||
#define throw_RTCError(error,str) \
|
||||
- throw rtcore_error(error,std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str));
|
||||
+ printf(std::string(__FILE__) + " (" + toString(__LINE__) + "): " + std::string(str)), abort();
|
||||
+ printf("%s (%d): %s", __FILE__, __LINE__, std::string(str).c_str()), abort();
|
||||
+ // -- GODOT end --
|
||||
#else
|
||||
+ // -- GODOT begin --
|
||||
|
|
|
@ -597,9 +597,14 @@ char *ogg_sync_buffer(ogg_sync_state *oy, long size){
|
|||
|
||||
if(size>oy->storage-oy->fill){
|
||||
/* We need to extend the internal buffer */
|
||||
long newsize=size+oy->fill+4096; /* an extra page to be nice */
|
||||
long newsize;
|
||||
void *ret;
|
||||
|
||||
if(size>INT_MAX-4096-oy->fill){
|
||||
ogg_sync_clear(oy);
|
||||
return NULL;
|
||||
}
|
||||
newsize=size+oy->fill+4096; /* an extra page to be nice */
|
||||
if(oy->data)
|
||||
ret=_ogg_realloc(oy->data,newsize);
|
||||
else
|
||||
|
@ -1564,7 +1569,7 @@ void test_pack(const int *pl, const int **headers, int byteskip,
|
|||
byteskipcount=byteskip;
|
||||
}
|
||||
|
||||
ogg_sync_wrote(&oy,next-buf);
|
||||
ogg_sync_wrote(&oy,(long)(next-buf));
|
||||
|
||||
while(1){
|
||||
int ret=ogg_sync_pageout(&oy,&og_de);
|
||||
|
|
|
@ -1,7 +1,20 @@
|
|||
#ifndef __CONFIG_TYPES_H__
|
||||
#define __CONFIG_TYPES_H__
|
||||
|
||||
#include "core/int_types.h"
|
||||
/* these are filled in by configure or cmake*/
|
||||
#define INCLUDE_INTTYPES_H 1
|
||||
#define INCLUDE_STDINT_H 1
|
||||
#define INCLUDE_SYS_TYPES_H 1
|
||||
|
||||
#if INCLUDE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#if INCLUDE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
#if INCLUDE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
typedef int16_t ogg_int16_t;
|
||||
typedef uint16_t ogg_uint16_t;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2002-2018 Xiph.org Foundation
|
||||
Copyright (c) 2002-2020 Xiph.org Foundation
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
*
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <ogg/ogg.h>
|
||||
#include "vorbis/codec.h"
|
||||
#include "codec_internal.h"
|
||||
|
@ -30,8 +29,8 @@
|
|||
#include "misc.h"
|
||||
#include "os.h"
|
||||
|
||||
#define GENERAL_VENDOR_STRING "Xiph.Org libVorbis 1.3.6"
|
||||
#define ENCODE_VENDOR_STRING "Xiph.Org libVorbis I 20180316 (Now 100% fewer shells)"
|
||||
#define GENERAL_VENDOR_STRING "Xiph.Org libVorbis 1.3.7"
|
||||
#define ENCODE_VENDOR_STRING "Xiph.Org libVorbis I 20200704 (Reducing Environment)"
|
||||
|
||||
/* helpers */
|
||||
static void _v_writestring(oggpack_buffer *o,const char *s, int bytes){
|
||||
|
@ -47,6 +46,10 @@ static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){
|
|||
}
|
||||
}
|
||||
|
||||
static int _v_toupper(int c) {
|
||||
return (c >= 'a' && c <= 'z') ? (c & ~('a' - 'A')) : c;
|
||||
}
|
||||
|
||||
void vorbis_comment_init(vorbis_comment *vc){
|
||||
memset(vc,0,sizeof(*vc));
|
||||
}
|
||||
|
@ -78,7 +81,7 @@ void vorbis_comment_add_tag(vorbis_comment *vc, const char *tag, const char *con
|
|||
static int tagcompare(const char *s1, const char *s2, int n){
|
||||
int c=0;
|
||||
while(c < n){
|
||||
if(toupper(s1[c]) != toupper(s2[c]))
|
||||
if(_v_toupper(s1[c]) != _v_toupper(s2[c]))
|
||||
return !0;
|
||||
c++;
|
||||
}
|
||||
|
@ -203,6 +206,7 @@ void vorbis_info_clear(vorbis_info *vi){
|
|||
|
||||
static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){
|
||||
codec_setup_info *ci=vi->codec_setup;
|
||||
int bs;
|
||||
if(!ci)return(OV_EFAULT);
|
||||
|
||||
vi->version=oggpack_read(opb,32);
|
||||
|
@ -215,8 +219,12 @@ static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){
|
|||
vi->bitrate_nominal=(ogg_int32_t)oggpack_read(opb,32);
|
||||
vi->bitrate_lower=(ogg_int32_t)oggpack_read(opb,32);
|
||||
|
||||
ci->blocksizes[0]=1<<oggpack_read(opb,4);
|
||||
ci->blocksizes[1]=1<<oggpack_read(opb,4);
|
||||
bs = oggpack_read(opb,4);
|
||||
if(bs<0)goto err_out;
|
||||
ci->blocksizes[0]=1<<bs;
|
||||
bs = oggpack_read(opb,4);
|
||||
if(bs<0)goto err_out;
|
||||
ci->blocksizes[1]=1<<bs;
|
||||
|
||||
if(vi->rate<1)goto err_out;
|
||||
if(vi->channels<1)goto err_out;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
@ -15,9 +15,10 @@
|
|||
The LSP generation code is taken (with minimal modification and a
|
||||
few bugfixes) from "On the Computation of the LSP Frequencies" by
|
||||
Joseph Rothweiler (see http://www.rothweiler.us for contact info).
|
||||
|
||||
The paper is available at:
|
||||
|
||||
http://www.myown1.com/joe/lsf
|
||||
https://web.archive.org/web/20110810174000/http://home.myfairpoint.net/vzenxj75/myown1/joe/lsf/index.html
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue