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

GLTF: Move shared defines into a separate gltf_defines.h file #63399

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

aaronfranke
Copy link
Member

In a nutshell, the current way the GLTF module works is like this:

  • GLTFState knows about most of the small classes.
  • GLTFDocument operates on GLTFState and the small classes.

As such, I found the current header situation confusing, since most of the small classes are including GLTFDocument. This PR fixes this confusing situation by moving the shared defines to a separate gltf_defines.h file, and moving the template conversion methods into a separate gltf_template_convert.h file. Now, there's a lot less including of gltf_document.h, and GLTFDocument declaring friend class is not necessary anymore.

@aaronfranke aaronfranke added this to the 4.0 milestone Jul 24, 2022
@aaronfranke aaronfranke requested a review from fire July 24, 2022 18:24
@aaronfranke aaronfranke requested a review from a team as a code owner July 24, 2022 18:24
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

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

Approved. Mechanical move. As long as the compiler is happy :)

Also move GLTFDocument's template conversion functions into gltf_template_convert.h
@akien-mga akien-mga merged commit 9233a6b into godotengine:master Jul 24, 2022
@akien-mga
Copy link
Member

Thanks!

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.

3 participants