1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/common/vector-wrapper.h>
23 #include <dali/public-api/actors/layer.h>
24 #include <dali/public-api/math/matrix.h>
25 #include <dali/internal/update/nodes/node.h>
43 typedef std::vector< RenderItem > RendererItemContainer;
46 * A render-item is a renderer & modelView matrix pair.
53 * Create a new render-item.
58 * Non-virtual destructor; RenderItem is not suitable as a base class.
63 * Reset the render-item.
68 * Retrieve the renderer.
69 * @return The renderer.
71 Render::Renderer& GetRenderer() const;
75 * @param[in] renderer The renderer
77 void SetRenderer( Render::Renderer* renderer );
81 * @param[in] node The node
83 void SetNode( Node* node );
89 const Node& GetNode() const
94 * Retrieve the modelView matrix.
95 * @return The modelView matrix.
97 Matrix& GetModelViewMatrix();
100 * Retrieve the modelView matrix.
101 * @return The modelView matrix.
103 const Matrix& GetModelViewMatrix() const;
106 * Retrieve the depth index
108 int GetDepthIndex() const
114 * Set the depth index
116 void SetDepthIndex( int depthIndex );
119 * Set if the RenderItem is opaque
120 * @param[in] isOpaque true if the RenderItem is opaque, false otherwise
122 void SetIsOpaque( bool isOpaque );
125 * Check if the RenderItem is opaque
126 * @return True if it is opaque, false otherwise
128 bool IsOpaque() const
135 // RenderItems should not be copied as they are heavy
136 RenderItem( const RenderItem& item );
137 RenderItem& operator = ( const RenderItem& item );
139 Matrix mModelViewMatrix;
140 Render::Renderer* mRenderer;
146 } // namespace SceneGraph
148 } // namespace Internal
152 #endif // __DALI_INTERNAL_SCENE_GRAPH_RENDER_ITEM_H__