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
+7 -2
View File
@@ -12,19 +12,24 @@ DECLARE_REF(Mesh)
DECLARE_REF(MeshAsset)
DECLARE_REF(Material)
DECLARE_NAME_REF(Gfx, Graphics)
struct MeshImportArgs
{
std::filesystem::path filePath;
std::string importPath;
};
class MeshLoader
{
public:
MeshLoader(Gfx::PGraphics graphic);
~MeshLoader();
void importAsset(const std::filesystem::path& filePath, const std::string& importPath);
void importAsset(MeshImportArgs args);
private:
void loadMaterials(const aiScene* scene, Array<PMaterial>& globalMaterials);
void loadTextures(const aiScene* scene, const std::filesystem::path& meshPath);
void loadGlobalMeshes(const aiScene* scene, const Array<PMaterial>& materials, Array<PMesh>& globalMeshes, Component::Collider& collider);
void convertAssimpARGB(unsigned char* dst, aiTexel* src, uint32 numPixels);
void import(std::filesystem::path path, PMeshAsset meshAsset);
void import(MeshImportArgs args, PMeshAsset meshAsset);
Gfx::PGraphics graphics;
};
DEFINE_REF(MeshLoader)