Jason Sams | 41371c7 | 2015-03-26 20:46:57 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2015 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 | |
| 17 | // Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. |
| 18 | |
| 19 | /* |
| 20 | * rs_mesh.rsh: Mesh routines |
| 21 | * |
| 22 | */ |
| 23 | #ifndef RENDERSCRIPT_RS_MESH_RSH |
| 24 | #define RENDERSCRIPT_RS_MESH_RSH |
| 25 | |
| 26 | /* |
| 27 | * Returns an allocation containing index data or a null |
| 28 | * allocation if only the primitive is specified |
| 29 | * |
| 30 | * Parameters: |
| 31 | * m mesh to get data from |
| 32 | * index index of the index allocation |
| 33 | * |
| 34 | * Returns: allocation containing index data |
| 35 | */ |
| 36 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 37 | extern rs_allocation __attribute__((overloadable)) |
| 38 | rsgMeshGetIndexAllocation(rs_mesh m, uint32_t index); |
| 39 | #endif |
| 40 | |
| 41 | /* |
| 42 | * Returns the primitive describing how a part of the mesh is |
| 43 | * rendered |
| 44 | * |
| 45 | * Parameters: |
| 46 | * m mesh to get data from |
| 47 | * index index of the primitive |
| 48 | * |
| 49 | * Returns: primitive describing how the mesh is rendered |
| 50 | */ |
| 51 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 52 | extern rs_primitive __attribute__((overloadable)) |
| 53 | rsgMeshGetPrimitive(rs_mesh m, uint32_t index); |
| 54 | #endif |
| 55 | |
| 56 | /* |
| 57 | * Meshes could have multiple index sets, this function returns |
| 58 | * the number. |
| 59 | * |
| 60 | * Parameters: |
| 61 | * m mesh to get data from |
| 62 | * |
| 63 | * Returns: number of primitive groups in the mesh. This would include simple primitives as well as allocations containing index data |
| 64 | */ |
| 65 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 66 | extern uint32_t __attribute__((overloadable)) |
| 67 | rsgMeshGetPrimitiveCount(rs_mesh m); |
| 68 | #endif |
| 69 | |
| 70 | /* |
| 71 | * Returns an allocation that is part of the mesh and contains |
| 72 | * vertex data, e.g. positions, normals, texcoords |
| 73 | * |
| 74 | * Parameters: |
| 75 | * m mesh to get data from |
| 76 | * index index of the vertex allocation |
| 77 | * |
| 78 | * Returns: allocation containing vertex data |
| 79 | */ |
| 80 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 81 | extern rs_allocation __attribute__((overloadable)) |
| 82 | rsgMeshGetVertexAllocation(rs_mesh m, uint32_t index); |
| 83 | #endif |
| 84 | |
| 85 | /* |
| 86 | * Returns the number of allocations in the mesh that contain |
| 87 | * vertex data |
| 88 | * |
| 89 | * Parameters: |
| 90 | * m mesh to get data from |
| 91 | * |
| 92 | * Returns: number of allocations in the mesh that contain vertex data |
| 93 | */ |
| 94 | #if (defined(RS_VERSION) && (RS_VERSION >= 16)) |
| 95 | extern uint32_t __attribute__((overloadable)) |
| 96 | rsgMeshGetVertexAllocationCount(rs_mesh m); |
| 97 | #endif |
| 98 | |
| 99 | #endif // RENDERSCRIPT_RS_MESH_RSH |