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 | |
| 17 | /*! \mainpage notitle |
| 18 | * |
| 19 | * Renderscript is a high-performance runtime that provides graphics rendering and |
| 20 | * compute operations at the native level. Renderscript code is compiled on devices |
| 21 | * at runtime to allow platform-independence as well. |
| 22 | * This reference documentation describes the Renderscript runtime APIs, which you |
| 23 | * can utilize to write Renderscript code in C99. The Renderscript header |
| 24 | * files are automatically included for you, except for the rs_graphics.rsh header. If |
| 25 | * you are doing graphics rendering, include the graphics header file like this: |
| 26 | * |
| 27 | * <code>#include "rs_graphics.rsh"</code> |
| 28 | * |
| 29 | * To use Renderscript, you need to utilize the Renderscript runtime APIs documented here |
| 30 | * as well as the Android framework APIs for Renderscript. |
| 31 | * For documentation on the Android framework APIs, see the <a target="_parent" href= |
| 32 | * "http://developer.android.com/reference/android/renderscript/package-summary.html"> |
| 33 | * android.renderscript</a> package reference. |
| 34 | * For more information on how to develop with Renderscript and how the runtime and |
| 35 | * Android framework APIs interact, see the <a target="_parent" href= |
| 36 | * "http://developer.android.com/guide/topics/renderscript/index.html">Renderscript |
| 37 | * developer guide</a> and the <a target="_parent" href= |
| 38 | * "http://developer.android.com/resources/samples/RenderScript/index.html"> |
| 39 | * Renderscript samples</a>. |
| 40 | */ |
| 41 | |
| 42 | /** @file rs_mesh.rsh |
| 43 | * \brief Mesh routines |
| 44 | * |
| 45 | * |
| 46 | */ |
| 47 | |
| 48 | #ifndef __RS_MESH_RSH__ |
| 49 | #define __RS_MESH_RSH__ |
| 50 | |
| 51 | /** |
| 52 | * @param m mesh to get data from |
| 53 | * @return number of allocations in the mesh that contain vertex |
| 54 | * data |
| 55 | */ |
| 56 | extern uint32_t __attribute__((overloadable)) |
| 57 | rsMeshGetVertexAllocationCount(rs_mesh m); |
| 58 | |
| 59 | /** |
| 60 | * @param m mesh to get data from |
| 61 | * @return number of primitive groups in the mesh. This would |
| 62 | * include simple primitives as well as allocations |
| 63 | * containing index data |
| 64 | */ |
| 65 | extern uint32_t __attribute__((overloadable)) |
| 66 | rsMeshGetPrimitiveCount(rs_mesh m); |
| 67 | |
| 68 | /** |
| 69 | * @param m mesh to get data from |
| 70 | * @param index index of the vertex allocation |
| 71 | * @return allocation containing vertex data |
| 72 | */ |
| 73 | extern rs_allocation __attribute__((overloadable)) |
| 74 | rsMeshGetVertexAllocation(rs_mesh m, uint32_t index); |
| 75 | |
| 76 | /** |
| 77 | * @param m mesh to get data from |
| 78 | * @param index index of the index allocation |
| 79 | * @return allocation containing index data |
| 80 | */ |
| 81 | extern rs_allocation __attribute__((overloadable)) |
| 82 | rsMeshGetIndexAllocation(rs_mesh m, uint32_t index); |
| 83 | |
| 84 | /** |
| 85 | * @param m mesh to get data from |
| 86 | * @param index index of the primitive |
| 87 | * @return primitive describing how the mesh is rendered |
| 88 | */ |
| 89 | extern rs_primitive __attribute__((overloadable)) |
| 90 | rsMeshGetPrimitive(rs_mesh m, uint32_t index); |
| 91 | |
| 92 | #endif // __RS_MESH_RSH__ |
| 93 | |