texture loading!

This commit is contained in:
Asuro
2025-03-28 04:28:06 +01:00
parent f56ffdaa13
commit 365805537c
26 changed files with 244 additions and 84 deletions

View File

@@ -21,10 +21,11 @@ namespace Game
Vec4 BaseColor{0.0f, 0.0f, 0.0f, 1.0f};
Transform Transform;
EMaterial MaterialHandle = EMaterial::UNDEFINED;
Generated::TextureHandle TextureHandle;
Generated::ModelHandle ModelH;
bool Visible = true;
void Render(const Model* models, const Material* materials);
void Render(const Model* models, const Material* materials, const Texture* textures);
};
ENTITY_HANDLE(CubeHandle);
@@ -118,12 +119,12 @@ namespace Game
return Data[handle.Idx];
}
void Render(const Model* models, const Material* materials)
void Render(const Model* models, const Material* materials, const Texture* textures)
{
if (!IsEnabled) return;
for (uint16_t i = 0; i < Count; ++i)
{
Get({i}).EData.Render(models, materials);
Get({i}).EData.Render(models, materials, textures);
}
}
};
@@ -156,6 +157,6 @@ namespace Game
public:
void Setup(GameData& data);
void Update();
void Render(uint16_t ViewID, const Model* models, const Material* materials);
void Render(uint16_t ViewID, const Model* models, const Material* materials, const Texture* textures);
};
} // namespace Game