OSDN Git Service

32-bit slang & bcc
[android-x86/prebuilt.git] / darwin-x86 / bcc / renderscript.h
1 #ifndef __RENDER_LIB_HDR__\r
2 #define __RENDER_LIB_HDR__\r
3 \r
4 struct vec2_s {float x; float y;};\r
5 struct vec3_s {float x; float y; float z;};\r
6 struct vec4_s {float x; float y; float z; float w;};\r
7 \r
8 int    loadI32(int, int);\r
9 float  loadF(int, int);\r
10 float* loadArrayF(int, int);\r
11 int*   loadArrayI32(int, int);\r
12 void   loadVec4(int, int, float *);\r
13 void   loadMatrix(int, int, float *);\r
14 void   storeI32(int, int, int);\r
15 void   storeF(int, int, float);\r
16 void   storeVec4(int, int, float *);\r
17 void   storeMatrix(int, int, float *);\r
18 float* loadSimpleMeshVerticesF(int, int);\r
19 void   updateSimpleMesh(int);\r
20 float  modf(float, float);\r
21 int    abs(int);\r
22 float  absf(float);\r
23 float  sinf_fast(float);\r
24 float  cosf_fast(float);\r
25 float  sinf(float);\r
26 float  cosf(float);\r
27 float  asinf(float);\r
28 float  acosf(float);\r
29 float  atanf(float);\r
30 float  atan2f(float, float);\r
31 float  fabsf(float);\r
32 float  randf(float);\r
33 float  randf2(float, float);\r
34 float  floorf(float);\r
35 float  fracf(float);\r
36 float  ceilf(float);\r
37 float  roundf(float);\r
38 float  expf(float);\r
39 float  logf(float);\r
40 float  powf(float, float);\r
41 float  maxf(float, float);\r
42 float  minf(float, float);\r
43 int    sqrt(int);\r
44 float  sqrtf(float);\r
45 int    sqr(int);\r
46 float  sqrf(float);\r
47 int    sign(int);\r
48 float  signf(float);\r
49 int    clamp(int, int, int);\r
50 float  clampf(float, float, float);\r
51 float  distf2(float, float, float, float);\r
52 float  distf3(float, float, float, float, float, float);\r
53 float  magf2(float, float);\r
54 float  magf3(float, float, float);\r
55 float  radf(float);\r
56 float  degf(float);\r
57 float  lerpf(float, float, float);\r
58 float  normf(float, float, float);\r
59 float  mapf(float, float, float, float, float);\r
60 float  noisef(float);\r
61 float  noisef2(float, float);\r
62 float  noisef3(float, float, float);\r
63 float  turbulencef2(float, float, float);\r
64 float  turbulencef3(float, float, float, float);\r
65 int    second();\r
66 int    minute();\r
67 int    hour();\r
68 int    day();\r
69 int    month();\r
70 int    year();\r
71 int    uptimeMillis();\r
72 int    startTimeMillis();\r
73 int    elapsedTimeMillis();\r
74 void   matrixLoadIdentity(float *mat);\r
75 void   matrixLoadFloat(float *mat, float *f);\r
76 void   matrixLoadMat(float *mat, float *newmat);\r
77 void   matrixLoadRotate(float *mat, float rot, float x, float y, float z);\r
78 void   matrixLoadScale(float *mat, float x, float y, float z);\r
79 void   matrixLoadTranslate(float *mat, float x, float y, float z);\r
80 void   matrixLoadMultiply(float *mat, float *lhs, float *rhs);\r
81 void   matrixMultiply(float *mat, float *rhs);\r
82 void   matrixRotate(float *mat, float rot, float x, float y, float z);\r
83 void   matrixScale(float *mat, float x, float y, float z);\r
84 void   matrixTranslate(float *mat, float x, float y, float z);\r
85 void   vec2Rand(float *vec, float maxLen);\r
86 void   vec3Norm(struct vec3_s *);\r
87 float  vec3Length(struct vec3_s *);\r
88 void   vec3Add(struct vec3_s *dest, struct vec3_s *lhs, struct vec3_s *rhs);\r
89 void   vec3Sub(struct vec3_s *dest, struct vec3_s *lhs, struct vec3_s *rhs);\r
90 void   vec3Cross(struct vec3_s *dest, struct vec3_s *lhs, struct vec3_s *rhs);\r
91 float  vec3Dot(struct vec3_s *lhs, struct vec3_s *rhs);\r
92 void   vec3Scale(struct vec3_s *lhs, float scale);\r
93 void   vec4Norm(struct vec4_s *);\r
94 float  vec4Length(struct vec4_s *);\r
95 void   vec4Add(struct vec4_s *dest, struct vec4_s *lhs, struct vec4_s *rhs);\r
96 void   vec4Sub(struct vec4_s *dest, struct vec4_s *lhs, struct vec4_s *rhs);\r
97 float  vec4Dot(struct vec4_s *lhs, struct vec4_s *rhs);\r
98 void   vec4Scale(struct vec4_s *lhs, float scale);\r
99 void   bindProgramFragment(int);\r
100 void   bindProgramFragmentStore(int);\r
101 void   bindProgramStore(int);\r
102 void   bindProgramVertex(int);\r
103 void   bindSampler(int, int, int);\r
104 void   bindTexture(int, int, int);\r
105 void   vpLoadModelMatrix(void *);\r
106 void   vpLoadTextureMatrix(void *);\r
107 void   drawRect(float x1, float y1, float x2, float y2, float z);\r
108 void   drawQuad(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4);\r
109 void   drawQuadTexCoords(float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2, float x3, float y3, float z3, float u3, float v3, float x4, float y4, float z4, float u4, float v4);\r
110 void   drawSprite(float x, float y, float z, float w, float h);\r
111 void   drawSpriteScreenspace(float x, float y, float z, float w, float h);\r
112 void   drawLine(float x1, float y1, float z1, float x2, float y2, float z2);\r
113 void   drawPoint(float x1, float y1, float z1);\r
114 void   drawSimpleMesh(int ism);\r
115 void   drawSimpleMeshRange(int ism, int start, int len);\r
116 void   pfClearColor(float, float, float, float);\r
117 void   color(float, float, float, float);\r
118 void   hsb(float, float, float, float);\r
119 void   hsbToRgb(float, float, float, float*);\r
120 int    hsbToAbgr(float, float, float, float);\r
121 void   ambient(float, float, float, float);\r
122 void   diffuse(float, float, float, float);\r
123 void   specular(float, float, float, float);\r
124 void   emission(float, float, float, float);\r
125 void   shininess(float);\r
126 void   pointAttenuation(float, float, float);\r
127 void   uploadToTexture(int, int);\r
128 void   uploadToBufferObject(int);\r
129 int    colorFloatRGBAtoUNorm8(float, float, float, float);\r
130 int    colorFloatRGBto565(float, float, float);\r
131 int    getWidth();\r
132 int    getHeight();\r
133 int    sendToClient(void *data, int cmdID, int len, int waitForSpace);\r
134 void   debugF(void *, float);\r
135 void   debugI32(void *, int);\r
136 void   debugHexF(void *, float);\r
137 void   debugHexI32(void *, int);\r
138 void   scriptCall(int);\r
139 #endif /*__RENDER_LIB_H__*/\r