New game interface

This commit is contained in:
Dynamitos
2023-02-01 22:13:04 +01:00
parent 0dce84459e
commit 9e1e4076f0
91 changed files with 268 additions and 21014 deletions
+13 -2
View File
@@ -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;
};