Added sampler properties, test cases.
[platform/core/uifw/dali-core.git] / dali / internal / render / data-providers / geometry-data-provider.h
1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_GEOMETRY_DATA_PROVIDER_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_GEOMETRY_DATA_PROVIDER_H__
3 /*
4  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #include <dali/public-api/geometry/geometry.h>
21 #include <dali/internal/common/buffer-index.h>
22 #include <dali/internal/common/owner-container.h>
23 #include <dali/internal/render/data-providers/property-buffer-data-provider.h>
24
25 namespace Dali
26 {
27 namespace Internal
28 {
29 namespace SceneGraph
30 {
31 class PropertyBuffer;
32
33 /**
34  * An interface to provide geometry data, such as the vertex buffers
35  * and index buffers (if present).  It provides a means of getting the
36  * vertex attribute meta data and vertex data from each buffer.  It
37  * provides the geometry type;
38  */
39 class GeometryDataProvider
40 {
41 public:
42   typedef Dali::Geometry::GeometryType GeometryType;
43   typedef Dali::Vector< const PropertyBufferDataProvider* > VertexBuffers;
44
45   /**
46    * Constructor. Nothing to do as a pure interface.
47    */
48   GeometryDataProvider() { }
49
50 public: // GeometryDataProvider
51   /**
52    * Get the type of geometry to draw
53    */
54   virtual GeometryType GetGeometryType( BufferIndex bufferIndex ) const = 0;
55
56   /**
57    * @todo MESH_REWORK - Should only use this in Update Sorting algorithm
58    * Returns true if this geometry requires depth testing, e.g. if it is
59    * a set of vertices with differing z values.
60    */
61   virtual bool GetRequiresDepthTesting( BufferIndex bufferIndex ) const = 0;
62
63 protected:
64
65   /**
66    * Virtual destructor, this is an interface, no deletion through this interface
67    */
68   virtual ~GeometryDataProvider() { }
69 };
70
71 } // SceneGraph
72 } // Internal
73 } // Dali
74
75 #endif // __DALI_INTERNAL_SCENE_GRAPH_GEOMETRY_DATA_PROVIDER_H__