asset manager

This commit is contained in:
2026-02-24 21:38:34 +02:00
parent 003106a4d7
commit e83f7cd448
9 changed files with 205 additions and 42 deletions

View File

@@ -5,6 +5,8 @@ class CBasicPBR: public CBaseMaterial
public:
DECLARE_CLASS(CBasicPBR, CBaseMaterial)
DECLARE_DATADESC()
DECLARE_SHADER("game/core/shaders/funny_basic_pbr.shader_c")
FMat::XMFLOAT4 m_vAlbedo = { 1, 1, 1, 1 };
FMat::XMTexture m_tAlbedo = TEXTURE_NO_TEXTURE;
@@ -23,6 +25,7 @@ class CBasicError: public CBaseMaterial
public:
DECLARE_CLASS(CBasicError, CBaseMaterial)
DECLARE_DATADESC()
DECLARE_SHADER("game/core/shaders/funny_error.shader_c")
};
BEGIN_DATADESC(CBasicError)

View File

@@ -4,7 +4,9 @@
void C_MOBAPlayer::Precache()
{
g_pAssetManager->LoadModel("game/core/models/cube.fmdl");
uint32_t uIndex = g_pAssetManager->LoadModel("game/core/models/cube.fmdl");
V_printf("%u\n", uIndex);
pModel = g_pAssetManager->GetModelByIndex(uIndex);
}