KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.33k stars 648 forks source link

Make sampler creation optional when loading textures #1027

Closed SaschaWillems closed 5 months ago

SaschaWillems commented 7 months ago

Description

This PR adds a new argument to the texture loading functions of the api samples base class that allows to skip default sampler creation. With this change samples that use custom samplers for certain textures (shader object, terrain tessellation) no longer need to delete the sampler that would've been implicitly created when loading the texture. This results in cleaner, easier to understand code.

Fixes #866

General Checklist:

Please ensure the following points are checked:

SaschaWillems commented 6 months ago

Will have to check. I tend to forget that I need to change stuff like this in two places. Maybe I'll defer this to after we have unified the framework :/