Messages and ownership of update objects
[platform/core/uifw/dali-core.git] / dali / internal / update / node-attachments / scene-graph-renderer-attachment.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #include "scene-graph-renderer-attachment.h"
18
19 namespace Dali
20 {
21 namespace Internal
22 {
23 namespace SceneGraph
24 {
25
26 RendererAttachment::RendererAttachment()
27 : RenderableAttachment( false ),
28   mMaterial(NULL),
29   mGeometry(NULL),
30   mDepthIndex(0)
31 {
32 }
33
34 RendererAttachment::~RendererAttachment()
35 {
36   mMaterial=NULL;
37   mGeometry=NULL;
38 }
39
40 void RendererAttachment::SetMaterial(const Material* material)
41 {
42   // @todo MESH_REWORK
43   mMaterial = material;
44 }
45
46 const Material& RendererAttachment::GetMaterial() const
47 {
48   return *mMaterial;
49 }
50
51 void RendererAttachment::SetGeometry(const Geometry* geometry)
52 {
53   // @todo MESH_REWORK
54   mGeometry = geometry;
55 }
56
57 const Geometry& RendererAttachment::GetGeometry() const
58 {
59   return *mGeometry;
60 }
61
62 void RendererAttachment::SetDepthIndex( int index )
63 {
64   // @todo MESH_REWORK
65   mDepthIndex = index;
66 }
67
68 int RendererAttachment::GetDepthIndex() const
69 {
70   return mDepthIndex;
71 }
72
73 } // namespace SceneGraph
74 } // namespace Internal
75 } // namespace Dali