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

Turn ModelRenderer and VoxelCache into traits #21066

Merged
merged 1 commit into from Sep 23, 2023

Conversation

PunkPun
Copy link
Member

@PunkPun PunkPun commented Sep 19, 2023

No longer will Renderer , World and ModContent need to acknowledge the existence of voxels. This cleans up the engine, but not fully. Next step would be better abstracting voxels from asset browser

public void EndFrame()
{
foreach (var r in renderers)
r.EndFrame();
Copy link
Contributor

Choose a reason for hiding this comment

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

Questions that come to mind.

Renderers would be independant of each other? No cross refences or shared state? Would some IRenderables references multiple renderers?

I see you pass the renderable when creating the IRenderable.

So this would mean the renderes could be active/called in any order.

This only ensures the order in which begin and end frame is called.

Might be an option to put MapEditor DebugRenderables in seperate renderer. But may not have much added value.

Copy link
Member Author

Choose a reason for hiding this comment

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

This will get much more polished once we turn SpriteRenderers into a trait. This current solution is as minimal as possible

@PunkPun PunkPun force-pushed the ModelRenderer branch 3 times, most recently from f06a73e to 2c901dd Compare September 20, 2023 13:55
@PunkPun PunkPun changed the title Turn ModelRenderer into a trait Turn ModelRenderer and VoxelCache into traits Sep 20, 2023
@PunkPun PunkPun mentioned this pull request Sep 21, 2023
@PunkPun PunkPun force-pushed the ModelRenderer branch 2 times, most recently from 20d65c2 to e11a4db Compare September 23, 2023 15:33
@Mailaender
Copy link
Member

You can remove PlaceholderModelSequence from mod.yaml now.

@PunkPun
Copy link
Member Author

PunkPun commented Sep 23, 2023

Good catch, removed

@Mailaender Mailaender merged commit 686040a into OpenRA:bleed Sep 23, 2023
3 checks passed
@Mailaender
Copy link
Member

Mailaender commented Sep 23, 2023

Changelog

@PunkPun PunkPun deleted the ModelRenderer branch September 23, 2023 17:47
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.

None yet

3 participants