Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5911: Add file sorting functionality to ThreadedDefLoader. ShaderFil…
…eLoader and ParticleLoader are subclassing the ThreadedDefLoader. Compiling and working, but some parse code still needs to be migrated.
- Loading branch information
1 parent
fcadac2
commit 689e06d
Showing
19 changed files
with
318 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
#pragma once | ||
|
||
#include "ifonts.h" | ||
|
||
#include "ifilesystem.h" | ||
#include "ThreadedDefLoader.h" | ||
|
||
namespace fonts | ||
{ | ||
|
||
class FontManager; | ||
|
||
class FontLoader | ||
class FontLoader : | ||
public util::ThreadedDefLoader<void> | ||
{ | ||
private: | ||
// The base path for the shaders (e.g. "materials/") | ||
std::string _basePath; | ||
|
||
// The manager for registering the fonts | ||
FontManager& _manager; | ||
|
||
std::size_t _numFonts; | ||
|
||
public: | ||
// Constructor. Set the base path of the search. | ||
FontLoader(const std::string& path, FontManager& manager) : | ||
_basePath(path), | ||
_manager(manager) | ||
FontLoader(const std::string& path, const std::string& extension, FontManager& manager) : | ||
ThreadedDefLoader(path, extension, 2, std::bind(&FontLoader::loadFonts, this)), | ||
_manager(manager), | ||
_numFonts(0) | ||
{} | ||
|
||
void operator()(const vfs::FileInfo& fileInfo); | ||
private: | ||
void loadFonts(); | ||
void loadFont(const vfs::FileInfo& fileInfo); | ||
}; | ||
|
||
} // namespace fonts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.