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

Reimplement certain Builtin types in Dart #8

Open
fuzzybinary opened this issue Jun 7, 2023 · 0 comments
Open

Reimplement certain Builtin types in Dart #8

fuzzybinary opened this issue Jun 7, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@fuzzybinary
Copy link
Owner

godot-cpp doesn't generate a lot of the builtin types, especially the math heavy ones, as going back and forth through the Godot calling system would be cumbersome. Instead, they re-implement them in C++

We should take a similar approach in Dart, only copying values out to opaque memory when needed. The classes that should get this treatment are:

  • aabb
  • basis
  • color
  • plane
  • projection
  • quaternion
  • rect2
  • rect2i
  • transform2d
  • transform3d
  • vector2
  • vector2i
  • vector3
  • vector3i
  • vector4
  • vector4i

This will also allow us to simplify their interfaces, including allowing default parameters for constructors instead of using named constructors for everything but the default.

@fuzzybinary fuzzybinary added enhancement New feature or request help wanted Extra attention is needed labels Jun 7, 2023
fuzzybinary added a commit that referenced this issue Jun 30, 2023
The hope is that this is a bit more performant, as it doesn't jump to Godot every time it needs to do something, and it doesn't allocate memory for variables that are never sent to Godot.

This will be done for most of the math based Variants, but started with Vector3 to see what it was like.

refs: #8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant