add light

This commit is contained in:
2025-11-19 13:50:33 +01:00
parent 4910894bef
commit 770c3f790b
6 changed files with 49 additions and 13 deletions
+6 -1
View File
@@ -1,7 +1,10 @@
#include "Light.h"
UINT Light::init()
UINT Light::init(D3DLIGHT9& lightData, UINT id)
{
_lightData = lightData;
_id = id;
return 0;
}
@@ -11,6 +14,8 @@ void Light::update(FLOAT dt)
void Light::render(IDirect3DDevice9* pD3DDevice)
{
pD3DDevice->SetLight(_id, &_lightData);
pD3DDevice->LightEnable(_id, TRUE);
}
void Light::deInit()