28 Logger::Get().
Log(
"Construct skybox", __FILE__, __LINE__, Logger::LogLevel::Initialize);
30 char modelFilename[128];
31 strcpy_s(modelFilename,
"assets/Model/OBJ/skysphere.obj");
33 std::vector<std::wstring> skyboxTextures = {
34 L
"assets/Skybox/skybox.png",
40 for (
const auto& textureFilename : skyboxTextures)
42 ID3D11ShaderResourceView* texture =
nullptr;
43 HRESULT result = DirectX::CreateWICTextureFromFile(m_d3dClassRef->
get_device(), m_d3dClassRef->
get_device_context(), textureFilename.c_str(),
nullptr, &texture);
46 Logger::Get().
Log(
"Failed to load texture: " + std::string(textureFilename.begin(), textureFilename.end()), __FILE__, __LINE__, Logger::LogLevel::Error);
49 SkyboxTextures.diffuse.push_back(texture);
54 m_Skybox =
new object(*app);
58 Logger::Get().
Log(
"Could not initialize the skybox model object", __FILE__, __LINE__, Logger::LogLevel::Error);
62 m_Skybox->SetTranslateMatrix(XMMatrixTranslation(0.0f, 0.0f, 0.0f));
63 m_Skybox->SetActiveShader(ShaderType::SKYBOX);