質問

I didn't find enough informations to really understand how to create a resource only DLL and what types of file I can build into. I'm developing a lightweight graphics engine in C++ based on DirectX 11. It uses third party libraries (for GUI rendering for example) and it requires lot of textures, bitmap fonts etc. So, it would be great to build these resources into a dll because it should be part of my engine and it shouldn't be accessable by anyone using this engine.

Before rendering GUI (3rd party api), paths to folders containing resources have to be specified. And here is the problem. I guess it's not possible, but I have to ask. Is it possible to keep a directory structure in dll? And if only method how to load resources requires path to file (std::string), how to get a path to these resources if they are built in dll?

What is the typical approach to create an embedded resource?

役に立ちましたか?

解決

Is it possible to keep a directory structure in dll?

Resources in a DLL are stored in a flat layout with no hierarchy. You just have a list of resources, each with its own unique identifier. If you wish to impose hierarchy you need to implement that external to the resource DLL.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top