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

feat: added render_order to the objects to control when they are sent to the gpu #46

Merged

Conversation

akowi-sknobloch
Copy link
Contributor

When rendering 2D Scenes it's common to use the render order to control wich objects get rendered on top of each others.
I've added render_order to the Object struct to control this behaviour.
This works similar to the z-index in CSS where a higher render_order causes objects to be rendered in front.

@ElhamAryanpur
Copy link
Collaborator

@akowi-sknobloch you could already achieve it with z index directly tbh. As all scenes are 3D inherently, so just manipulating the z index could change their order regardless of the render order.

I'll still look into it and test it out, ty for the PR 🔥

@ElhamAryanpur ElhamAryanpur merged commit 4b7f6d0 into AryanpurTech:master Sep 13, 2023
3 checks passed
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