1 /* 2 * Copyright (C) 2023 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 #if !defined(RENDER_MESH_BATCH_COMPONENT) || defined(IMPLEMENT_MANAGER) 17 #define RENDER_MESH_BATCH_COMPONENT 18 19 #if !defined(IMPLEMENT_MANAGER) 20 #include <3d/namespace.h> 21 #include <core/ecs/component_struct_macros.h> 22 #include <core/ecs/intf_component_manager.h> 23 #include <core/property/property_types.h> 24 25 CORE3D_BEGIN_NAMESPACE() 26 #endif 27 BEGIN_COMPONENT(IRenderMeshBatchComponentManager, RenderMeshBatchComponent) 28 #if !defined(IMPLEMENT_MANAGER) 29 enum class BatchType : uint8_t { 30 /* GPU instancing */ 31 GPU_INSTANCING = 0, 32 }; 33 #endif 34 DEFINE_PROPERTY(BatchType, batchType, "Batch Type", 0, VALUE(BatchType::GPU_INSTANCING)) 35 END_COMPONENT(IRenderMeshBatchComponentManager, RenderMeshBatchComponent, "f72d1dcf-c68c-4b61-9582-601c3fdbccf8") 36 #if !defined(IMPLEMENT_MANAGER) 37 CORE3D_END_NAMESPACE() 38 #endif 39 40 #endif 41