-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Projection::invert on orthogonal projections and others. #24
Conversation
core/math/projection.cpp
Outdated
#define SWAP_ROWS(a, b) \ | ||
{ \ | ||
real_t *_tmp = a; \ | ||
(a) = (b); \ | ||
(b) = _tmp; \ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just use https://en.cppreference.com/w/cpp/algorithm/swap ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Godot intentionally avoids using the STL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case Godot/Redot should probably provide an alternative, macro uses like that are entirely unnecessary in C++.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Godot intentionally avoids using the STL
I can't find a reference to the reasoning for this, do you know it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Godot intentionally avoids using the STL
I can't find a reference to the reasoning for this, do you know it?
Here. https://docs.godotengine.org/en/stable/contributing/development/cpp_usage_guidelines.html
The document states that STL is not allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if it were possible to implement Abseil so that Godot/Redot wouldn't need to manually implement custom types. For example, instead of using Godot's custom String type versus STL's String type, they could use Abseil with Unicode support and achieve smaller binary sizes compared to using STL.
Fixes godotengine#68878, specially when using orthographic projection. Also adds some tests.
3aa46b9
to
3efcb0c
Compare
Could you link the implementation from which this was pulled? |
Related to godotengine/godot#68878, specially when using orthographic projection.
Replaces our invert implementation with mesa's, which seems to work fine.