blob: f4e3f5737bb8ae8a89afc432e2a32cff2839575f [file] [log] [blame]
Jason Samsd19f10d2009-05-22 14:03:28 -07001/*
2 * Copyright (C) 2007 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#ifndef RENDER_SCRIPT_H
18#define RENDER_SCRIPT_H
19
20#include <stdint.h>
21#include <sys/types.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
Jason Samse4a06c52011-03-16 16:29:28 -070027#include "RenderScriptDefines.h"
Jason Sams11c8af92010-10-13 15:31:10 -070028
Jason Samse4a06c52011-03-16 16:29:28 -070029//
Alex Sakhartchouk581cc642010-10-27 14:10:07 -070030// A3D loading and object update code.
31// Should only be called at object creation, not thread safe
32RsObjectBase rsaFileA3DGetEntryByIndex(RsContext, uint32_t idx, RsFile);
Alex Sakhartchoukb0253ea2011-01-07 11:12:08 -080033RsFile rsaFileA3DCreateFromMemory(RsContext, const void *data, uint32_t len);
34RsFile rsaFileA3DCreateFromAsset(RsContext, void *asset);
35RsFile rsaFileA3DCreateFromFile(RsContext, const char *path);
Alex Sakhartchouk581cc642010-10-27 14:10:07 -070036void rsaFileA3DGetNumIndexEntries(RsContext, int32_t *numEntries, RsFile);
37void rsaFileA3DGetIndexEntries(RsContext, RsFileIndexEntry *fileEntries,uint32_t numEntries, RsFile);
38void rsaGetName(RsContext, void * obj, const char **name);
39// Mesh update functions
40void rsaMeshGetVertexBufferCount(RsContext, RsMesh, int32_t *vtxCount);
41void rsaMeshGetIndexCount(RsContext, RsMesh, int32_t *idxCount);
42void rsaMeshGetVertices(RsContext, RsMesh, RsAllocation *vtxData, uint32_t vtxDataCount);
43void rsaMeshGetIndices(RsContext, RsMesh, RsAllocation *va, uint32_t *primType, uint32_t idxDataCount);
44// Allocation update
45const void* rsaAllocationGetType(RsContext con, RsAllocation va);
46// Type update
47void rsaTypeGetNativeData(RsContext, RsType, uint32_t *typeData, uint32_t typeDataSize);
48// Element update
49void rsaElementGetNativeData(RsContext, RsElement, uint32_t *elemData, uint32_t elemDataSize);
50void rsaElementGetSubElements(RsContext, RsElement, uint32_t *ids, const char **names, uint32_t dataSize);
Jason Sams11c8af92010-10-13 15:31:10 -070051
Jason Sams65bdaf12011-04-26 14:50:00 -070052
53
Alex Sakhartchoukd0f5bd12011-01-31 14:53:24 -080054#ifdef ANDROID_RS_SERIALIZE
Alex Sakhartchouka3b59602011-01-28 09:31:47 -080055#define NO_RS_FUNCS
56#endif
Jason Sams3b9c52a2010-10-14 17:48:46 -070057
Jason Sams7eecbf22010-02-23 15:27:51 -080058#ifndef NO_RS_FUNCS
Jason Samsd19f10d2009-05-22 14:03:28 -070059#include "rsgApiFuncDecl.h"
Jason Sams7eecbf22010-02-23 15:27:51 -080060#endif
Jason Samsd19f10d2009-05-22 14:03:28 -070061
62#ifdef __cplusplus
63};
64#endif
65
66#endif // RENDER_SCRIPT_H
67
68
69