Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

EIREXE
Copy link
Contributor

@EIREXE EIREXE commented Oct 1, 2024

Related to godotengine/godot#68878, specially when using orthographic projection.

Replaces our invert implementation with mesa's, which seems to work fine.

Comment on lines 610 to 615
#define SWAP_ROWS(a, b) \
{ \
real_t *_tmp = a; \
(a) = (b); \
(b) = _tmp; \
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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

Copy link

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++.

Copy link

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?

Copy link

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.

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.
@Spartan322
Copy link
Member

Could you link the implementation from which this was pulled?

@EIREXE EIREXE closed this Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants