/* * 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 * */ #pragma once #include #include #include #include #include #include #include // Some versions of Visual Studio have a bug that prevents debugging static member. // https://developercommunity.visualstudio.com/content/problem/25756/cannot-view-static-member-variables-in-debugger.html #define AZ_DEBUG_STATIC_MEMEBER(localVariable, staticMember) AZStd::add_lvalue_reference::type localVariable = staticMember; AZ_UNUSED(localVariable); namespace AtomSampleViewer { namespace Utils { AZ::RHI::Ptr GetRHIDevice(); struct AssetEntry { AZStd::string m_path; AZ::Data::AssetId m_assetId; AZStd::string m_name; }; /** * Helper for ImGui * Used to help display a ListBox of AssetEntries */ bool AssetEntryNameGetter(void* data, int index, const char** outName); void ToggleRadTMCapture(); class DefaultIBL { public: DefaultIBL() = default; ~DefaultIBL(); void PreloadAssets(); void Init(AZ::RPI::Scene* scene); void SetExposure(float exposure); void Reset(); private: AZ::Render::ImageBasedLightFeatureProcessorInterface* m_featureProcessor = nullptr; AZ::Data::Asset m_diffuseImageAsset; AZ::Data::Asset m_specularImageAsset; }; bool SupportsResizeClientArea(); void ResizeClientArea(uint32_t width, uint32_t height, const AzFramework::WindowPosOptions& options); bool SupportsToggleFullScreenOfDefaultWindow(); void ToggleFullScreenOfDefaultWindow(); void ReportScriptableAction(const char* formatStr, ...); // Discovers, from the settings registry, the path to the diff tool and invokes // the per-platform RunDiffTool_Impl. bool RunDiffTool(const AZStd::string& filePathA, const AZStd::string& filePathB); // Customized per platform AZStd::string GetDefaultDiffToolPath_Impl(); bool RunDiffTool_Impl(const AZStd::string& diffToolPath, const AZStd::string& filePathA, const AZStd::string& filePathB); AZ::Data::Instance GetSolidColorCubemap(uint32_t color); //! Provides a more convenient way to call AZ::IO::FileIOBase::GetInstance()->ResolvePath() AZStd::string ResolvePath(const AZStd::string& path); //! Returns true if the file resides within a folder bool IsFileUnderFolder(AZStd::string filePath, AZStd::string folder); } // namespace Utils } // namespace AtomSampleViewer