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