blob: 87ffd33c0d5c5968d8649c7c3b1f8c5698ea56b5 [file] [log] [blame]
Alex Sakhartchouk14607a62012-03-21 09:58:15 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
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
Alex Sakhartchouk14607a62012-03-21 09:58:15 -070017/** @file rs_mesh.rsh
18 * \brief Mesh routines
19 *
20 *
21 */
22
23#ifndef __RS_MESH_RSH__
24#define __RS_MESH_RSH__
25
Alex Sakhartchouk3c0c6062012-03-22 16:59:38 -070026#if (defined(RS_VERSION) && (RS_VERSION >= 16))
27
Alex Sakhartchouk14607a62012-03-21 09:58:15 -070028/**
29 * @param m mesh to get data from
30 * @return number of allocations in the mesh that contain vertex
31 * data
32 */
33extern uint32_t __attribute__((overloadable))
Alex Sakhartchoukf8e195e2012-03-22 10:50:55 -070034 rsgMeshGetVertexAllocationCount(rs_mesh m);
Alex Sakhartchouk14607a62012-03-21 09:58:15 -070035
36/**
37 * @param m mesh to get data from
38 * @return number of primitive groups in the mesh. This would
39 * include simple primitives as well as allocations
40 * containing index data
41 */
42extern uint32_t __attribute__((overloadable))
Alex Sakhartchoukf8e195e2012-03-22 10:50:55 -070043 rsgMeshGetPrimitiveCount(rs_mesh m);
Alex Sakhartchouk14607a62012-03-21 09:58:15 -070044
45/**
46 * @param m mesh to get data from
47 * @param index index of the vertex allocation
48 * @return allocation containing vertex data
49 */
50extern rs_allocation __attribute__((overloadable))
Alex Sakhartchoukf8e195e2012-03-22 10:50:55 -070051 rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index);
Alex Sakhartchouk14607a62012-03-21 09:58:15 -070052
53/**
54 * @param m mesh to get data from
55 * @param index index of the index allocation
56 * @return allocation containing index data
57 */
58extern rs_allocation __attribute__((overloadable))
Alex Sakhartchoukf8e195e2012-03-22 10:50:55 -070059 rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index);
Alex Sakhartchouk14607a62012-03-21 09:58:15 -070060
61/**
62 * @param m mesh to get data from
63 * @param index index of the primitive
64 * @return primitive describing how the mesh is rendered
65 */
66extern rs_primitive __attribute__((overloadable))
Alex Sakhartchoukf8e195e2012-03-22 10:50:55 -070067 rsgMeshGetPrimitive(rs_mesh m, uint32_t index);
Alex Sakhartchouk14607a62012-03-21 09:58:15 -070068
Alex Sakhartchouk3c0c6062012-03-22 16:59:38 -070069#endif // (defined(RS_VERSION) && (RS_VERSION >= 16))
70
Alex Sakhartchouk14607a62012-03-21 09:58:15 -070071#endif // __RS_MESH_RSH__
72