1 #ifndef __DALI_INTERNAL_SCENE_GRAPH_GEOMETRY_DATA_PROVIDER_H__
2 #define __DALI_INTERNAL_SCENE_GRAPH_GEOMETRY_DATA_PROVIDER_H__
4 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
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>
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;
39 class GeometryDataProvider
42 typedef Dali::Geometry::GeometryType GeometryType;
43 typedef Dali::Vector< const PropertyBufferDataProvider* > VertexBuffers;
46 * Constructor. Nothing to do as a pure interface.
48 GeometryDataProvider() { }
50 public: // GeometryDataProvider
52 * Get the type of geometry to draw
54 virtual GeometryType GetGeometryType( BufferIndex bufferIndex ) const = 0;
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.
61 virtual bool GetRequiresDepthTesting( BufferIndex bufferIndex ) const = 0;
66 * Virtual destructor, this is an interface, no deletion through this interface
68 virtual ~GeometryDataProvider() { }
75 #endif // __DALI_INTERNAL_SCENE_GRAPH_GEOMETRY_DATA_PROVIDER_H__