blob: 8bf53bf2666c21953adda9673a3070c02ac333ce [file] [log] [blame]
Jason Sams22fa3712010-05-19 17:22:57 -07001#include "rs_cl.rsh"
Jason Sams275b1e92010-05-28 18:08:16 -07002#include "rs_core.rsh"
3
Jason Sams717e34a2010-03-16 15:35:57 -07004
Jason Samsbe36bf32010-05-11 14:03:58 -07005
Jason Sams22fa3712010-05-19 17:22:57 -07006// Allocations
Jason Samsce92d4b2010-05-17 14:55:34 -07007extern rs_allocation rsGetAllocation(const void *);
Jason Sams22fa3712010-05-19 17:22:57 -07008extern uint32_t rsAllocationGetDimX(rs_allocation);
9extern uint32_t rsAllocationGetDimY(rs_allocation);
10extern uint32_t rsAllocationGetDimZ(rs_allocation);
11extern uint32_t rsAllocationGetDimLOD(rs_allocation);
12extern uint32_t rsAllocationGetDimFaces(rs_allocation);
13
14
15
Jason Sams22fa3712010-05-19 17:22:57 -070016// Debugging
17extern void __attribute__((overloadable))rsDebug(const char *, float);
18extern void __attribute__((overloadable))rsDebug(const char *, float2);
19extern void __attribute__((overloadable))rsDebug(const char *, float3);
20extern void __attribute__((overloadable))rsDebug(const char *, float4);
21extern void __attribute__((overloadable))rsDebug(const char *, int);
22extern void __attribute__((overloadable))rsDebug(const char *, const void *);
23#define RS_DEBUG(a) rsDebug(#a, a)
24#define RS_DEBUG_MARKER rsDebug(__FILE__, __LINE__)
25
26// RS Math
27extern int __attribute__((overloadable)) rsRand(int);
28extern int __attribute__((overloadable)) rsRand(int, int);
29extern float __attribute__((overloadable)) rsRand(float);
30extern float __attribute__((overloadable)) rsRand(float, float);
31
32extern float __attribute__((overloadable)) rsFrac(float);
33
34// time
35extern int32_t rsSecond();
36extern int32_t rsMinute();
37extern int32_t rsHour();
38extern int32_t rsDay();
39extern int32_t rsMonth();
40extern int32_t rsYear();
41extern int64_t rsUptimeMillis();
42extern int64_t rsStartTimeMillis();
43extern int64_t rsElapsedTimeMillis();
44
45extern int rsSendToClient(void *data, int cmdID, int len, int waitForSpace);
46
Jason Samsc61346b2010-05-28 18:23:22 -070047// Script to Script
48extern void __attribute__((overloadable))rsForEach(rs_script, rs_allocation input);
49extern void __attribute__((overloadable))rsForEach(rs_script, rs_allocation input, rs_allocation output);
50extern void __attribute__((overloadable))rsForEach(rs_script, rs_allocation input, int xStart, int xEnd);
51extern void __attribute__((overloadable))rsForEach(rs_script, rs_allocation input, rs_allocation output, int xStart, int xEnd);
52extern void __attribute__((overloadable))rsForEach(rs_script, rs_allocation input, int xStart, int yStart, int xEnd, int yEnd);
53extern void __attribute__((overloadable))rsForEach(rs_script, rs_allocation input, rs_allocation output, int xStart, int yStart, int xEnd, int yEnd);
54
Jason Sams22fa3712010-05-19 17:22:57 -070055