ash icon indicating copy to clipboard operation
ash copied to clipboard

Refactor triangle and texture examples to use better practices

Open hgallagher1993 opened this issue 4 years ago • 4 comments

Fixes #190

It's a huge commit but almost all of it is just moving around already existing code rather than newly written code. The reason it's so big is because I decided to refactor the ExampleBase so it matches https://vulkan-tutorial.com/ more closely which has the creation of everything broken down into small functions so I decided to do the same with the ExampleBase:: new(..) so that's pretty much where all the changed lines have come from.

As well as that I fixed the order of destroy_buffer, free_memory etc so when you close the window it doesn't error saying the device hasn't been destroyed.

And I created the render_triangle and render_texture functions just to keep the event_loop a bit smaller and less convoluted

hgallagher1993 avatar Jan 12 '21 21:01 hgallagher1993

The reason it's so big is because I decided to refactor the ExampleBase so it matches https://vulkan-tutorial.com/

I haven't reviewed any changes yet, but this immediately gives me pause. vulkan-tutorial.com is a bit notorious for teaching poor practice; please don't take its patterns as gospel.

Ralith avatar Jan 12 '21 21:01 Ralith

@Ralith I've seen that the build failed on Clippy and Rustfmt but I'll wait until a full review is done before submitting fixes for them?

hgallagher1993 avatar Jan 14 '21 18:01 hgallagher1993

@hgallagher1993 eh push it

ColdIce1605 avatar Feb 26 '21 17:02 ColdIce1605

any updates on this? Its been 6 months since the last update?

hYdos avatar Oct 19 '21 08:10 hYdos