Minor Update - Log pour plus de fichier
This commit is contained in:
@@ -19,6 +19,7 @@ DisplayPlaneClass::~DisplayPlaneClass()
|
||||
|
||||
bool DisplayPlaneClass::Initialize(ID3D11Device* device, float width, float height)
|
||||
{
|
||||
logger.Log("Initializing DisplayPlaneClass, width: " + std::to_string(width) + ", height: " + std::to_string(height), __FILE__, __LINE__);
|
||||
bool result;
|
||||
|
||||
|
||||
@@ -26,6 +27,7 @@ bool DisplayPlaneClass::Initialize(ID3D11Device* device, float width, float heig
|
||||
result = InitializeBuffers(device, width, height);
|
||||
if (!result)
|
||||
{
|
||||
logger.Log("Could not initialize buffers", __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,6 +60,8 @@ int DisplayPlaneClass::GetIndexCount()
|
||||
|
||||
bool DisplayPlaneClass::InitializeBuffers(ID3D11Device* device, float width, float height)
|
||||
{
|
||||
logger.Log("Initializing buffers", __FILE__, __LINE__);
|
||||
|
||||
VertexType* vertices;
|
||||
unsigned long* indices;
|
||||
D3D11_BUFFER_DESC vertexBufferDesc, indexBufferDesc;
|
||||
@@ -122,6 +126,7 @@ bool DisplayPlaneClass::InitializeBuffers(ID3D11Device* device, float width, flo
|
||||
result = device->CreateBuffer(&vertexBufferDesc, &vertexData, &m_vertexBuffer);
|
||||
if (FAILED(result))
|
||||
{
|
||||
logger.Log("Could not create vertex buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -142,6 +147,7 @@ bool DisplayPlaneClass::InitializeBuffers(ID3D11Device* device, float width, flo
|
||||
result = device->CreateBuffer(&indexBufferDesc, &indexData, &m_indexBuffer);
|
||||
if (FAILED(result))
|
||||
{
|
||||
logger.Log("Could not create index buffer", __FILE__, __LINE__, Logger::LogLevel::Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -152,6 +158,8 @@ bool DisplayPlaneClass::InitializeBuffers(ID3D11Device* device, float width, flo
|
||||
delete[] indices;
|
||||
indices = 0;
|
||||
|
||||
logger.Log("Buffers initialized", __FILE__, __LINE__);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user