diff options
Diffstat (limited to 'libs/rs/scriptc/rs_allocation.rsh')
-rw-r--r-- | libs/rs/scriptc/rs_allocation.rsh | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/libs/rs/scriptc/rs_allocation.rsh b/libs/rs/scriptc/rs_allocation.rsh index 9ec03bf..a2f69d9 100644 --- a/libs/rs/scriptc/rs_allocation.rsh +++ b/libs/rs/scriptc/rs_allocation.rsh @@ -168,5 +168,135 @@ extern const void * __attribute__((overloadable)) extern const void * __attribute__((overloadable)) rsGetElementAt(rs_allocation, uint32_t x, uint32_t y, uint32_t z); +/** + * @param a allocation to get data from + * @return element describing allocation layout + */ +extern rs_element __attribute__((overloadable)) + rsAllocationGetElement(rs_allocation a); + +/** + * @param m mesh to get data from + * @return number of allocations in the mesh that contain vertex + * data + */ +extern uint32_t __attribute__((overloadable)) + rsMeshGetVertexAllocationCount(rs_mesh m); + +/** + * @param m mesh to get data from + * @return number of primitive groups in the mesh. This would + * include simple primitives as well as allocations + * containing index data + */ +extern uint32_t __attribute__((overloadable)) + rsMeshGetPrimitiveCount(rs_mesh m); + +/** + * @param m mesh to get data from + * @param index index of the vertex allocation + * @return allocation containing vertex data + */ +extern rs_allocation __attribute__((overloadable)) + rsMeshGetVertexAllocation(rs_mesh m, uint32_t index); + +/** + * @param m mesh to get data from + * @param index index of the index allocation + * @return allocation containing index data + */ +extern rs_allocation __attribute__((overloadable)) + rsMeshGetIndexAllocation(rs_mesh m, uint32_t index); + +/** + * @param m mesh to get data from + * @param index index of the primitive + * @return primitive describing how the mesh is rendered + */ +extern rs_primitive __attribute__((overloadable)) + rsMeshGetPrimitive(rs_mesh m, uint32_t index); + +/** + * @param e element to get data from + * @return number of sub-elements in this element + */ +extern uint32_t __attribute__((overloadable)) + rsElementGetSubElementCount(rs_element e); + +/** + * @param e element to get data from + * @param index index of the sub-element to return + * @return sub-element in this element at given index + */ +extern rs_element __attribute__((overloadable)) + rsElementGetSubElement(rs_element, uint32_t index); + +/** + * @param e element to get data from + * @param index index of the sub-element to return + * @return length of the sub-element name including the null + * terminator (size of buffer needed to write the name) + */ +extern uint32_t __attribute__((overloadable)) + rsElementGetSubElementNameLength(rs_element e, uint32_t index); + +/** + * @param e element to get data from + * @param index index of the sub-element + * @param name array to store the name into + * @param nameLength length of the provided name array + * @return number of characters actually written, excluding the + * null terminator + */ +extern uint32_t __attribute__((overloadable)) + rsElementGetSubElementName(rs_element e, uint32_t index, char *name, uint32_t nameLength); + +/** + * @param e element to get data from + * @param index index of the sub-element + * @return array size of sub-element in this element at given + * index + */ +extern uint32_t __attribute__((overloadable)) + rsElementGetSubElementArraySize(rs_element e, uint32_t index); + +/** + * @param e element to get data from + * @param index index of the sub-element + * @return offset in bytes of sub-element in this element at + * given index + */ +extern uint32_t __attribute__((overloadable)) + rsElementGetSubElementOffsetBytes(rs_element e, uint32_t index); + +/** + * @param e element to get data from + * @return total size of the element in bytes + */ +extern uint32_t __attribute__((overloadable)) + rsElementGetSizeBytes(rs_element e); + +/** + * @param e element to get data from + * @return element's data type + */ +extern rs_data_type __attribute__((overloadable)) + rsElementGetDataType(rs_element e); + +/** + * @param e element to get data from + * @return element's data size + */ +extern rs_data_kind __attribute__((overloadable)) + rsElementGetDataKind(rs_element e); + +/** + * @param e element to get data from + * @return length of the element vector (for float2, float3, + * etc.) + */ +extern uint32_t __attribute__((overloadable)) + rsElementGetVectorSize(rs_element e); + #endif |