minor update - préparation sunlight
This commit is contained in:
@@ -134,6 +134,13 @@ bool ShaderManagerClass::Initialize(ID3D11Device* device, HWND hwnd)
|
||||
return false;
|
||||
}
|
||||
|
||||
m_SunlightShader = new SunlightShaderClass;
|
||||
result = m_SunlightShader->Initialize(device, hwnd);
|
||||
if (!result)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Logger::Get().Log("ShaderManagerClass initialized", __FILE__, __LINE__, Logger::LogLevel::Initialize);
|
||||
|
||||
return true;
|
||||
@@ -239,6 +246,13 @@ void ShaderManagerClass::Shutdown()
|
||||
m_CelShadingShader = 0;
|
||||
}
|
||||
|
||||
if (m_SunlightShader)
|
||||
{
|
||||
m_SunlightShader->Shutdown();
|
||||
delete m_SunlightShader;
|
||||
m_SunlightShader = 0;
|
||||
}
|
||||
|
||||
Logger::Get().Log("ShaderManagerClass shut down", __FILE__, __LINE__, Logger::LogLevel::Shutdown);
|
||||
}
|
||||
|
||||
@@ -419,4 +433,18 @@ bool ShaderManagerClass::RenderCelShadingShader(ID3D11DeviceContext* deviceConte
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ShaderManagerClass::RenderSunlightShader(ID3D11DeviceContext* deviceContext, int indexCount, XMMATRIX worldMatrix, XMMATRIX viewMatrix, XMMATRIX projectionMatrix,
|
||||
ID3D11ShaderResourceView* texture, XMFLOAT4 ambientColor, XMFLOAT4 diffuseColor, XMFLOAT4 sunColor)
|
||||
{
|
||||
bool result;
|
||||
|
||||
result = m_SunlightShader->Render(deviceContext, indexCount, worldMatrix, viewMatrix, projectionMatrix, texture, ambientColor, diffuseColor, sunColor);
|
||||
if (!result)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user