Alex Sakhartchouk | 14607a6 | 2012-03-21 09:58:15 -0700 | [diff] [blame] | 1 | /* |
| 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 Sakhartchouk | 14607a6 | 2012-03-21 09:58:15 -0700 | [diff] [blame] | 17 | /** @file rs_mesh.rsh |
| 18 | * \brief Mesh routines |
| 19 | * |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #ifndef __RS_MESH_RSH__ |
| 24 | #define __RS_MESH_RSH__ |
| 25 | |
Alex Sakhartchouk | 3c0c606 | 2012-03-22 16:59:38 -0700 | [diff] [blame^] | 26 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 27 | |
Alex Sakhartchouk | 14607a6 | 2012-03-21 09:58:15 -0700 | [diff] [blame] | 28 | /** |
| 29 | * @param m mesh to get data from |
| 30 | * @return number of allocations in the mesh that contain vertex |
| 31 | * data |
| 32 | */ |
| 33 | extern uint32_t __attribute__((overloadable)) |
Alex Sakhartchouk | f8e195e | 2012-03-22 10:50:55 -0700 | [diff] [blame] | 34 | rsgMeshGetVertexAllocationCount(rs_mesh m); |
Alex Sakhartchouk | 14607a6 | 2012-03-21 09:58:15 -0700 | [diff] [blame] | 35 | |
| 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 | */ |
| 42 | extern uint32_t __attribute__((overloadable)) |
Alex Sakhartchouk | f8e195e | 2012-03-22 10:50:55 -0700 | [diff] [blame] | 43 | rsgMeshGetPrimitiveCount(rs_mesh m); |
Alex Sakhartchouk | 14607a6 | 2012-03-21 09:58:15 -0700 | [diff] [blame] | 44 | |
| 45 | /** |
| 46 | * @param m mesh to get data from |
| 47 | * @param index index of the vertex allocation |
| 48 | * @return allocation containing vertex data |
| 49 | */ |
| 50 | extern rs_allocation __attribute__((overloadable)) |
Alex Sakhartchouk | f8e195e | 2012-03-22 10:50:55 -0700 | [diff] [blame] | 51 | rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index); |
Alex Sakhartchouk | 14607a6 | 2012-03-21 09:58:15 -0700 | [diff] [blame] | 52 | |
| 53 | /** |
| 54 | * @param m mesh to get data from |
| 55 | * @param index index of the index allocation |
| 56 | * @return allocation containing index data |
| 57 | */ |
| 58 | extern rs_allocation __attribute__((overloadable)) |
Alex Sakhartchouk | f8e195e | 2012-03-22 10:50:55 -0700 | [diff] [blame] | 59 | rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index); |
Alex Sakhartchouk | 14607a6 | 2012-03-21 09:58:15 -0700 | [diff] [blame] | 60 | |
| 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 | */ |
| 66 | extern rs_primitive __attribute__((overloadable)) |
Alex Sakhartchouk | f8e195e | 2012-03-22 10:50:55 -0700 | [diff] [blame] | 67 | rsgMeshGetPrimitive(rs_mesh m, uint32_t index); |
Alex Sakhartchouk | 14607a6 | 2012-03-21 09:58:15 -0700 | [diff] [blame] | 68 | |
Alex Sakhartchouk | 3c0c606 | 2012-03-22 16:59:38 -0700 | [diff] [blame^] | 69 | #endif // (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 70 | |
Alex Sakhartchouk | 14607a6 | 2012-03-21 09:58:15 -0700 | [diff] [blame] | 71 | #endif // __RS_MESH_RSH__ |
| 72 | |