This commit is contained in:
StratiX0
2024-03-25 16:40:12 +01:00
parent 35876a05a5
commit 6ee3c2d934
10 changed files with 434 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ ApplicationClass::~ApplicationClass()
bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd)
{
char modelFilename[128];
char outputModelFilename[128];
char textureFilename[128];
bool result;
@@ -54,7 +55,9 @@ bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd)
m_Camera->SetRotation(0.0f, 0.0f, 10.0f);
// Set the file name of the model.
strcpy_s(modelFilename, "cube.txt");
strcpy_s(modelFilename, "cube.obj");
strcpy_s(outputModelFilename, "output.txt");
// Set the name of the texture file that we will be loading.
strcpy_s(textureFilename, "stone01.tga");
@@ -62,7 +65,7 @@ bool ApplicationClass::Initialize(int screenWidth, int screenHeight, HWND hwnd)
// Create and initialize the model object.
m_Model = new ModelClass;
result = m_Model->Initialize(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), modelFilename, textureFilename);
result = m_Model->Initialize(m_Direct3D->GetDevice(), m_Direct3D->GetDeviceContext(), modelFilename, outputModelFilename, textureFilename);
if (!result)
{
MessageBox(hwnd, L"Could not initialize the model object.", L"Error", MB_OK);