New game interface
This commit is contained in:
@@ -8,15 +8,26 @@ namespace Seele
|
||||
DECLARE_REF(TextureAsset)
|
||||
DECLARE_NAME_REF(Gfx, Graphics)
|
||||
DECLARE_NAME_REF(Gfx, Texture2D)
|
||||
enum class TextureImportType
|
||||
{
|
||||
TEXTURE_2D,
|
||||
TEXTURE_CUBEMAP,
|
||||
};
|
||||
struct TextureImportArgs
|
||||
{
|
||||
std::filesystem::path filePath;
|
||||
std::string importPath;
|
||||
TextureImportType type = TextureImportType::TEXTURE_2D;
|
||||
};
|
||||
class TextureLoader
|
||||
{
|
||||
public:
|
||||
TextureLoader(Gfx::PGraphics graphic);
|
||||
~TextureLoader();
|
||||
void importAsset(const std::filesystem::path& filePath, const std::string& importPath);
|
||||
void importAsset(TextureImportArgs args);
|
||||
PTextureAsset getPlaceholderTexture();
|
||||
private:
|
||||
void import(std::filesystem::path path, PTextureAsset asset);
|
||||
void import(TextureImportArgs args, PTextureAsset asset);
|
||||
Gfx::PGraphics graphics;
|
||||
PTextureAsset placeholderAsset;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user