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 #include <scene_plugin/namespace.h>
17 
18 #include <meta/interface/intf_object_registry.h>
19 ///////////////////////////////////////////////////////////////
20 // Specialisations
21 ///////////////////////////////////////////////////////////////
22 
23 #include "anim_impl.h"
24 #include "camera_impl.h"
25 #include "env_impl.h"
26 #include "graphicsstate_impl.h"
27 #include "light_impl.h"
28 #include "material_impl.h"
29 #include "mesh_impl.h"
30 #include "multimesh_impl.h"
31 #include "node_impl.h"
32 #include "postprocess_effect_impl.h"
33 #include "postprocess_impl.h"
34 #include "propertyholder_impl.h"
35 #include "render_configuration_impl.h"
36 #include "resource_container.h"
37 #include "shader_impl.h"
38 #include "submesh_impl.h"
39 #include "submeshhandler.h"
40 #include "textureinfo_impl.h"
41 
SCENE_BEGIN_NAMESPACE()42 SCENE_BEGIN_NAMESPACE()
43 
44 void RegisterNodes()
45 {
46     auto& registry = META_NS::GetObjectRegistry();
47     RegisterNodeImpl();
48     RegisterEnvImpl();
49     RegisterPostprocessImpl();
50     RegisterPostprocessEffectImpl();
51     RegisterRenderConfigurationImpl();
52     RegisterCameraImpl();
53 
54     RegisterLightImpl();
55     RegisterMaterialImpl();
56     RegisterMeshImpl();
57     RegisterMultiMeshImpl();
58     RegisterAnimImpl();
59     // not nodes, but data for the nodes
60     RegisterGraphicsStateImpl();
61     RegisterPropertyHolderImpl();
62     RegisterShaderImpl();
63     RegisterSubMeshHandler();
64     RegisterSubMeshImpl();
65     RegisterTextureInfoImpl();
66 
67     RegisterResourceContainerImpl();
68 }
69 
UnregisterNodes()70 void UnregisterNodes()
71 {
72     auto& registry = META_NS::GetObjectRegistry();
73     UnregisterNodeImpl();
74     UnregisterEnvImpl();
75     UnregisterCameraImpl();
76     UnregisterPostprocessImpl();
77     UnregisterPostprocessEffectImpl();
78     UnregisterRenderConfigurationImpl();
79     UnregisterLightImpl();
80     UnregisterMaterialImpl();
81     UnregisterMeshImpl();
82     UnregisterMultiMeshImpl();
83     UnregisterAnimImpl();
84     // not nodes, but data for the nodes
85     UnregisterGraphicsStateImpl();
86     UnregisterPropertyHolderImpl();
87     UnregisterShaderImpl();
88     UnregisterSubMeshHandler();
89     UnregisterSubMeshImpl();
90     UnregisterTextureInfoImpl();
91 
92     UnregisterResourceContainerImpl();
93 }
94 
95 SCENE_END_NAMESPACE()
96