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

Moved render settings onto entity. #512

Merged
merged 5 commits into from
Feb 11, 2024
Merged

Moved render settings onto entity. #512

merged 5 commits into from
Feb 11, 2024

Conversation

StarArawn
Copy link
Owner

Description

This allows a user to customize render settings per tilemap entity.

Why is this useful?

It allows users to specify render chunk sizes per tilemap/layer. If a user has a tilemap that doesn't change often they can gain performance by setting the chunk size to be very large reducing draw calls and they can mix another tilemap layer that might update more frequently on top of the more static map.

@StarArawn
Copy link
Owner Author

Realized I didn't update the examples, working on that now..

examples/bench.rs Outdated Show resolved Hide resolved
@rparrett
Copy link
Collaborator

Any reason not to set a reasonable default render chunk size and include this in the bundles?

Copy link
Collaborator

@rparrett rparrett left a comment

Choose a reason for hiding this comment

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

Looks good to me, and I tested all the examples.

It occurred to me that I have no idea how to test when the render feature is not enabled though.

Noticed one more little typo.

examples/chunking.rs Outdated Show resolved Hide resolved
@StarArawn
Copy link
Owner Author

Looks good to me, and I tested all the examples.

It occurred to me that I have no idea how to test when the render feature is not enabled though.

Noticed one more little typo.

You can test that by using the --no-default-features cargo parameter.

@StarArawn StarArawn merged commit b75d4b1 into main Feb 11, 2024
8 checks passed
@StarArawn StarArawn deleted the move-render-settings branch February 11, 2024 13:36
@rparrett
Copy link
Collaborator

You can test that by using the --no-default-features cargo parameter.

Oh, yeah, I just meant that we don't have any examples that utilize this "mode." They all require the render feature, and I just sort of don't know what is even expected to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants