You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/Atom/Tools/ShaderManagementConsole/Code/Source/ShaderManagementConsoleAppl...

59 lines
2.2 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <Atom/Document/ShaderManagementConsoleDocumentModule.h>
#include <Atom/Window/ShaderManagementConsoleWindowModule.h>
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <ShaderManagementConsoleApplication.h>
#include <ShaderManagementConsole_Traits_Platform.h>
namespace ShaderManagementConsole
{
//! This function returns the build system target name of "ShaderManagementConsole"
AZStd::string ShaderManagementConsoleApplication::GetBuildTargetName() const
{
#if !defined(LY_CMAKE_TARGET)
#error "LY_CMAKE_TARGET must be defined in order to add this source file to a CMake executable target"
#endif
return AZStd::string_view{ LY_CMAKE_TARGET };
}
const char* ShaderManagementConsoleApplication::GetCurrentConfigurationName() const
{
#if defined(_RELEASE)
return "ReleaseShaderManagementConsole";
#elif defined(_DEBUG)
return "DebugShaderManagementConsole";
#else
return "ProfileShaderManagementConsole";
#endif
}
ShaderManagementConsoleApplication::ShaderManagementConsoleApplication(int* argc, char*** argv)
: Base(argc, argv)
{
QApplication::setApplicationName("O3DE Shader Management Console");
// The settings registry has been created at this point, so add the CMake target
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddBuildSystemTargetSpecialization(
*AZ::SettingsRegistry::Get(), GetBuildTargetName());
}
void ShaderManagementConsoleApplication::CreateStaticModules(AZStd::vector<AZ::Module*>& outModules)
{
Base::CreateStaticModules(outModules);
outModules.push_back(aznew ShaderManagementConsoleDocumentModule);
outModules.push_back(aznew ShaderManagementConsoleWindowModule);
}
AZStd::vector<AZStd::string> ShaderManagementConsoleApplication::GetCriticalAssetFilters() const
{
return AZStd::vector<AZStd::string>({ "passes/", "config/" });
}
} // namespace ShaderManagementConsole