-
Notifications
You must be signed in to change notification settings - Fork 22
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
Render events #132
Render events #132
Conversation
This won't work with object what use model cache. A trick is needed here. |
I implemented this feature for ModelCacheManager too. I updated the example code and reuploaded the example project. |
This looks interesting I will test it out soon |
Checked out the demo and code. I am open to merging it, not sure how many actual use cases it has but I do not see any harm in having custom events for before or after a render. In your example code though I think it wouldn't scale well if you had lots of houses because every post event is flushing the batch. Two questions
|
Yes, I'm sure that this is not the best solution, but currently I don't know better solution to render whole model in dept rendering and render part of model in other rendering.
The
I've not tested this feature on HTML. Thanks if you test it. The weekend at the earliest when I can test it on HTML. |
I may have a suggestion that will prevent having to flush the batch like that. Have a render event that is executed pre-render and a separate render event executed pre-depth render. That way, on the pre-depth render you would switch the opacity back to 1.0. I just did a quick test and it works without flushing the batch. Something like picture below May not even need the after render event anymore? Just a BeforeRenderEvent and BeforeDepthRenderEvent? |
Thanks, I've implemented it and works. Here is the example code:
The testing on HTML is missing, maybe I can do it on the next days. |
I've fixed the code for HTML. Here is the example project: |
Everything looks good, one last thing. Could you fix the spelling on "Dept" should be "Depth" |
Done. |
Thanks! |
Hi,
I added render event handling. I want to render the part of building in dept capturing but render the whole building in the other render process. I've tried to figure out a generic solution for it.
building.mp4
Example code:
Example project:
libgdx-mundus-building.zip