diff --git a/src/render/renderIO.cpp b/src/render/renderIO.cpp index 7fd5cf0..249bdf2 100644 --- a/src/render/renderIO.cpp +++ b/src/render/renderIO.cpp @@ -27,7 +27,7 @@ void PlumageRender::RenderInput::loadEnvironment(std::string fileName,PBR::Mater pbrMaterial.generateCubemap(vkFoundation,setter,mainRender); } -void PlumageRender::RenderInput::loadAssets() +void PlumageRender::RenderInput::loadAssets(Setter setter,renderMain mainRender,VulkanBackend::VulkanFoundation vkFoundation) { const std::string assetpath = getAssetPath(); @@ -45,13 +45,13 @@ void PlumageRender::RenderInput::loadAssets() readDirectory(assetpath + "environments", "*.ktx", environments, false); - PBR::Material::textures.empty.loadFromFile(PlumageRender::Setter::filePath.emptyEnvmapFilePath, VK_FORMAT_R8G8B8A8_UNORM, VulkanBackend::VulkanFoundation::vulkanDevice, VulkanBackend::VulkanFoundation::graphicQueue); + PBR::Material::textures.empty.loadFromFile(setter.filePath.emptyEnvmapFilePath, VK_FORMAT_R8G8B8A8_UNORM, vkFoundation.vulkanDevice, vkFoundation.graphicQueue); - std::string sceneFile = PlumageRender::Setter::filePath.glTFModelFilePath; - std::string envMapFile = PlumageRender::Setter::filePath.envMapFilePath; + std::string sceneFile = setter.filePath.glTFModelFilePath; + std::string envMapFile = setter.filePath.envMapFilePath; - loadScene(sceneFile.c_str()); - PlumageRender::renderMain::models.skybox.loadFromFile(PlumageRender::Setter::filePath.skyboxModleFilePath, VulkanBackend::VulkanFoundation::vulkanDevice, VulkanBackend::VulkanFoundation::graphicQueue); + loadScene(sceneFile.c_str(),mainRender,vkFoundation); + mainRender.models.skybox.loadFromFile(setter.filePath.skyboxModleFilePath, vkFoundation.vulkanDevice, vkFoundation.graphicQueue); loadEnvironment(envMapFile.c_str()); } diff --git a/src/render/renderIO.h b/src/render/renderIO.h index 963d6dd..17d6e1f 100644 --- a/src/render/renderIO.h +++ b/src/render/renderIO.h @@ -32,8 +32,8 @@ namespace PlumageRender void loadScene(std::string fileName, renderMain& mainRender, VulkanBackend::VulkanFoundation vkFoundation); - void loadEnvironment(std::string fileName); - + void loadEnvironment(std::string fileName, PBR::Material pbrMaterial, Setter setter, VulkanBackend::VulkanFoundation vkFoundation, renderMain& mainRender); + void loadAssets();