blob: edf98ef180d37f8700382cfacc2c11fa3991b1db [file] [log] [blame]
Jason Sams326e0dd2009-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
Jason Sams66f0a162014-11-11 13:46:38 -080023#include "rsInternalDefines.h"
Jason Sams6b8552a2010-10-13 15:31:10 -070024
Tim Murrayc2ce7072013-07-17 18:38:53 -070025extern "C" {
Jayant Chowdhary8ee6d932017-09-29 11:27:45 -070026 // Legacy graphics functions
27 RsObjectBase rsaFileA3DGetEntryByIndex(RsContext, uint32_t idx, RsFile);
28 RsFile rsaFileA3DCreateFromMemory(RsContext, const void *data,
29 uint32_t len);
30 RsFile rsaFileA3DCreateFromAsset(RsContext, void *asset);
31 RsFile rsaFileA3DCreateFromFile(RsContext, const char *path);
32 void rsaFileA3DGetNumIndexEntries(RsContext, int32_t *numEntries, RsFile);
33 void rsaFileA3DGetIndexEntries(RsContext, RsFileIndexEntry *fileEntries,
34 uint32_t numEntries, RsFile);
35 // Mesh update functions
36 void rsaMeshGetVertexBufferCount(RsContext, RsMesh, int32_t *vtxCount);
37 void rsaMeshGetIndexCount(RsContext, RsMesh, int32_t *idxCount);
38 void rsaMeshGetVertices(RsContext, RsMesh, RsAllocation *vtxData,
39 uint32_t vtxDataCount);
40 void rsaMeshGetIndices(RsContext, RsMesh, RsAllocation *va,
41 uint32_t *primType, uint32_t idxDataCount);
42 RsContext rsContextCreateGL(RsDevice dev, uint32_t version,
43 uint32_t sdkVersion, RsSurfaceConfig sc,
44 uint32_t dpi);
45
Tim Murrayc2ce7072013-07-17 18:38:53 -070046 void rsaGetName(RsContext, void * obj, const char **name);
47 // Allocation update
48 const void* rsaAllocationGetType(RsContext con, RsAllocation va);
49 // Type update
Tim Murray0a8ec2c2013-11-19 14:02:38 -080050 void rsaTypeGetNativeData(RsContext, RsType, uintptr_t *typeData, uint32_t typeDataSize);
Tim Murrayc2ce7072013-07-17 18:38:53 -070051 // Element update
Tim Murray0a8ec2c2013-11-19 14:02:38 -080052 void rsaElementGetNativeData(RsContext, RsElement, uintptr_t *elemData, uint32_t elemDataSize);
53 void rsaElementGetSubElements(RsContext, RsElement, uintptr_t *ids, const char **names,
Tim Murrayc2ce7072013-07-17 18:38:53 -070054 uint32_t *arraySizes, uint32_t dataSize);
55
56 RsDevice rsDeviceCreate();
57 void rsDeviceDestroy(RsDevice dev);
58 void rsDeviceSetConfig(RsDevice dev, RsDeviceParam p, int32_t value);
59 RsContext rsContextCreate(RsDevice dev, uint32_t version, uint32_t sdkVersion,
Tim Murray84e3dea2013-09-09 16:12:51 -070060 RsContextType ct, uint32_t flags);
Tim Murrayc2ce7072013-07-17 18:38:53 -070061}
Jason Sams326e0dd2009-05-22 14:03:28 -070062#include "rsgApiFuncDecl.h"
Jason Sams326e0dd2009-05-22 14:03:28 -070063
Jason Sams326e0dd2009-05-22 14:03:28 -070064#endif // RENDER_SCRIPT_H
65
66
67