|
Photon Engine 2.0.0-beta
A physically based renderer.
|
Resolves dependency between SDL resources and provides a valid initialization order. Optionally provide resource name lookup (if user provides resource name during analyzation). More...
#include <SdlDependencyResolver.h>
Public Member Functions | |
| SdlDependencyResolver () | |
| void | analyze (TSpanView< const ISdlResource * > resources, TSpanView< std::string > resourceNames={}) |
| Submit resources and start to resolve their dependencies. The containers for input do not need to be kept alive after this call. | |
| const ISdlResource * | next () |
| Get a resource from the analyzed scene with a valid dependency ordering. | |
| std::string_view | getResourceName (const ISdlResource *resource) const |
Get resource name by resource pointer. Only valid for the resources in the last analyze() call. String buffer is backed by the resolver. | |
Resolves dependency between SDL resources and provides a valid initialization order. Optionally provide resource name lookup (if user provides resource name during analyzation).
| ph::SdlDependencyResolver::SdlDependencyResolver | ( | ) |
| void ph::SdlDependencyResolver::analyze | ( | TSpanView< const ISdlResource * > | resources, |
| TSpanView< std::string > | resourceNames = {} ) |
Submit resources and start to resolve their dependencies. The containers for input do not need to be kept alive after this call.
| resources | Resources to be analyzed. |
| resourceNames | Names for the resources. Must have exactly the same size as resources if provided. |
| std::string_view ph::SdlDependencyResolver::getResourceName | ( | const ISdlResource * | resource | ) | const |
Get resource name by resource pointer. Only valid for the resources in the last analyze() call. String buffer is backed by the resolver.
| const ISdlResource * ph::SdlDependencyResolver::next | ( | ) |
Get a resource from the analyzed scene with a valid dependency ordering.
nullptr is returned (which indicates all analyzed resources are returned).