1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef DEFAULT_ENGINE_CONSTANTS_H 17 #define DEFAULT_ENGINE_CONSTANTS_H 18 19 #include <base/containers/string_view.h> 20 #include <render/namespace.h> 21 22 RENDER_BEGIN_NAMESPACE() 23 /** \addtogroup group_engine_defaultengineconstants 24 * @{ 25 */ 26 /** Default GPU resource constants */ 27 struct DefaultEngineGpuResourceConstants { 28 /** Default built-in backbuffer/swapchain */ 29 static constexpr const BASE_NS::string_view CORE_DEFAULT_BACKBUFFER { "CORE_DEFAULT_BACKBUFFER" }; 30 /** Default backbuffer/swapchain depth (when rendering scene directly to backbuffer) */ 31 static constexpr const BASE_NS::string_view CORE_DEFAULT_BACKBUFFER_DEPTH { "CORE_DEFAULT_BACKBUFFER_DEPTH" }; 32 33 /** Default swapchain prefix */ 34 static constexpr const BASE_NS::string_view CORE_DEFAULT_SWAPCHAIN { "CORE_DEFAULT_SWAPCHAIN_" }; 35 36 /** Default GPU image, black */ 37 static constexpr const BASE_NS::string_view CORE_DEFAULT_GPU_IMAGE { "CORE_DEFAULT_GPU_IMAGE" }; 38 /** Default GPU image, white */ 39 static constexpr const BASE_NS::string_view CORE_DEFAULT_GPU_IMAGE_WHITE { "CORE_DEFAULT_GPU_IMAGE_WHITE" }; 40 41 /** Default GPU buffer, 1024 bytes */ 42 static constexpr const BASE_NS::string_view CORE_DEFAULT_GPU_BUFFER { "CORE_DEFAULT_GPU_BUFFER" }; 43 44 /** Default sampler, nearest repeat */ 45 static constexpr const BASE_NS::string_view CORE_DEFAULT_SAMPLER_NEAREST_REPEAT { 46 "CORE_DEFAULT_SAMPLER_NEAREST_REPEAT" 47 }; 48 /** Default sampler, nearest clamp */ 49 static constexpr const BASE_NS::string_view CORE_DEFAULT_SAMPLER_NEAREST_CLAMP { 50 "CORE_DEFAULT_SAMPLER_NEAREST_CLAMP" 51 }; 52 /** Default sampler, linear repeat */ 53 static constexpr const BASE_NS::string_view CORE_DEFAULT_SAMPLER_LINEAR_REPEAT { 54 "CORE_DEFAULT_SAMPLER_LINEAR_REPEAT" 55 }; 56 /** Default sampler, linear clamp */ 57 static constexpr const BASE_NS::string_view CORE_DEFAULT_SAMPLER_LINEAR_CLAMP { 58 "CORE_DEFAULT_SAMPLER_LINEAR_CLAMP" 59 }; 60 /** Default sampler, linear mipmap repeat */ 61 static constexpr const BASE_NS::string_view CORE_DEFAULT_SAMPLER_LINEAR_MIPMAP_REPEAT { 62 "CORE_DEFAULT_SAMPLER_LINEAR_MIPMAP_REPEAT" 63 }; 64 /** Default sampler, linear mipmap clamp */ 65 static constexpr const BASE_NS::string_view CORE_DEFAULT_SAMPLER_LINEAR_MIPMAP_CLAMP { 66 "CORE_DEFAULT_SAMPLER_LINEAR_MIPMAP_CLAMP" 67 }; 68 }; 69 /** @} */ 70 RENDER_END_NAMESPACE() 71 72 #endif // DEFAULT_ENGINE_CONSTANTS_H 73