Jean-Luc Brouillet | c5184e2 | 2015-03-13 13:51:24 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2015 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 | header: |
| 18 | summary: RenderScript graphics API |
| 19 | description: |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame^] | 20 | NOTE: RenderScript Graphics has been deprecated. Do not use. |
| 21 | |
Jean-Luc Brouillet | c5184e2 | 2015-03-13 13:51:24 -0700 | [diff] [blame] | 22 | A set of graphics functions used by RenderScript. |
| 23 | include: |
| 24 | #ifdef __LP64__ |
| 25 | // TODO We need to fix some of the builds before enabling this error: |
| 26 | // #error "RenderScript graphics is deprecated and not supported in 64bit mode." |
Jean-Luc Brouillet | c5184e2 | 2015-03-13 13:51:24 -0700 | [diff] [blame] | 27 | #endif |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame^] | 28 | |
| 29 | // TODO we seem to assume order for the other headers too. |
| 30 | #include "rs_object_types.rsh" |
| 31 | end: |
| 32 | |
| 33 | type: rs_blend_src_func |
| 34 | version: 16 |
| 35 | size: 32 |
| 36 | enum: |
| 37 | value: RS_BLEND_SRC_ZERO = 0 |
| 38 | value: RS_BLEND_SRC_ONE = 1 |
| 39 | value: RS_BLEND_SRC_DST_COLOR = 2 |
| 40 | value: RS_BLEND_SRC_ONE_MINUS_DST_COLOR = 3 |
| 41 | value: RS_BLEND_SRC_SRC_ALPHA = 4 |
| 42 | value: RS_BLEND_SRC_ONE_MINUS_SRC_ALPHA = 5 |
| 43 | value: RS_BLEND_SRC_DST_ALPHA = 6 |
| 44 | value: RS_BLEND_SRC_ONE_MINUS_DST_ALPHA = 7 |
| 45 | value: RS_BLEND_SRC_SRC_ALPHA_SATURATE = 8 |
| 46 | value: RS_BLEND_SRC_INVALID = 100 |
| 47 | summary: Blend source function |
| 48 | description: |
| 49 | end: |
| 50 | |
| 51 | type: rs_blend_dst_func |
| 52 | version: 16 |
| 53 | size: 32 |
| 54 | enum: |
| 55 | value: RS_BLEND_DST_ZERO = 0 |
| 56 | value: RS_BLEND_DST_ONE = 1 |
| 57 | value: RS_BLEND_DST_SRC_COLOR = 2 |
| 58 | value: RS_BLEND_DST_ONE_MINUS_SRC_COLOR = 3 |
| 59 | value: RS_BLEND_DST_SRC_ALPHA = 4 |
| 60 | value: RS_BLEND_DST_ONE_MINUS_SRC_ALPHA = 5 |
| 61 | value: RS_BLEND_DST_DST_ALPHA = 6 |
| 62 | value: RS_BLEND_DST_ONE_MINUS_DST_ALPHA = 7 |
| 63 | value: RS_BLEND_DST_INVALID = 100 |
| 64 | summary: Blend destination function |
| 65 | description: |
| 66 | end: |
| 67 | |
| 68 | type: rs_cull_mode |
| 69 | version: 16 |
| 70 | size: 32 |
| 71 | enum: |
| 72 | value: RS_CULL_BACK = 0 |
| 73 | value: RS_CULL_FRONT = 1 |
| 74 | value: RS_CULL_NONE = 2 |
| 75 | value: RS_CULL_INVALID = 100 |
| 76 | summary: Culling mode |
| 77 | description: |
| 78 | end: |
| 79 | |
| 80 | type: rs_depth_func |
| 81 | version: 16 |
| 82 | size: 32 |
| 83 | enum: |
| 84 | value: RS_DEPTH_FUNC_ALWAYS = 0, "Always drawn" |
| 85 | value: RS_DEPTH_FUNC_LESS = 1, "Drawn if the incoming depth value is less than that in the depth buffer" |
| 86 | value: RS_DEPTH_FUNC_LEQUAL = 2, "Drawn if the incoming depth value is less or equal to that in the depth buffer" |
| 87 | value: RS_DEPTH_FUNC_GREATER = 3, "Drawn if the incoming depth value is greater than that in the depth buffer" |
| 88 | value: RS_DEPTH_FUNC_GEQUAL = 4, "Drawn if the incoming depth value is greater or equal to that in the depth buffer" |
| 89 | value: RS_DEPTH_FUNC_EQUAL = 5, "Drawn if the incoming depth value is equal to that in the depth buffer" |
| 90 | value: RS_DEPTH_FUNC_NOTEQUAL = 6, "Drawn if the incoming depth value is not equal to that in the depth buffer" |
| 91 | value: RS_DEPTH_FUNC_INVALID = 100, "Invalid depth function" |
| 92 | summary: Depth function |
| 93 | description: |
| 94 | Specifies conditional drawing depending on the comparison of the incoming |
| 95 | depth to that found in the depth buffer. |
| 96 | end: |
| 97 | |
| 98 | type: rs_primitive |
| 99 | version: 16 |
| 100 | size: 32 |
| 101 | enum: |
| 102 | value: RS_PRIMITIVE_POINT = 0, "Vertex data will be rendered as a series of points" |
| 103 | value: RS_PRIMITIVE_LINE = 1, "Vertex pairs will be rendered as lines" |
| 104 | value: RS_PRIMITIVE_LINE_STRIP = 2, "Vertex data will be rendered as a connected line strip" |
| 105 | value: RS_PRIMITIVE_TRIANGLE = 3, "Vertices will be rendered as individual triangles" |
| 106 | value: RS_PRIMITIVE_TRIANGLE_STRIP = 4, "Vertices will be rendered as a connected triangle strip defined by the first three vertices with each additional triangle defined by a new vertex" |
| 107 | value: RS_PRIMITIVE_TRIANGLE_FAN = 5, "Vertices will be rendered as a sequence of triangles that all share first vertex as the origin" |
| 108 | value: RS_PRIMITIVE_INVALID = 100, "Invalid primitive" |
| 109 | summary: How to intepret mesh vertex data |
| 110 | description: |
| 111 | Describes the way mesh vertex data is interpreted when rendering |
| 112 | end: |
| 113 | |
| 114 | type: rs_font |
| 115 | size: 32 |
| 116 | simple: _RS_HANDLE |
| 117 | summary: Handle to a Font |
| 118 | description: |
| 119 | Opaque handle to a RenderScript font object. |
| 120 | See: android.renderscript.Font |
| 121 | end: |
| 122 | |
| 123 | |
| 124 | type: rs_mesh |
| 125 | size: 32 |
| 126 | simple: _RS_HANDLE |
| 127 | summary: Handle to a Mesh |
| 128 | description: |
| 129 | Opaque handle to a RenderScript mesh object. |
| 130 | See: android.renderscript.Mesh |
| 131 | end: |
| 132 | |
| 133 | type: rs_program_fragment |
| 134 | size: 32 |
| 135 | simple: _RS_HANDLE |
| 136 | summary: Handle to a ProgramFragment |
| 137 | description: |
| 138 | Opaque handle to a RenderScript ProgramFragment object. |
| 139 | See: android.renderscript.ProgramFragment |
| 140 | end: |
| 141 | |
| 142 | type: rs_program_vertex |
| 143 | size: 32 |
| 144 | simple: _RS_HANDLE |
| 145 | summary: Handle to a ProgramVertex |
| 146 | description: |
| 147 | Opaque handle to a RenderScript ProgramVertex object. |
| 148 | See: android.renderscript.ProgramVertex |
| 149 | end: |
| 150 | |
| 151 | type: rs_program_raster |
| 152 | size: 32 |
| 153 | simple: _RS_HANDLE |
| 154 | summary: Handle to a ProgramRaster |
| 155 | description: |
| 156 | Opaque handle to a RenderScript ProgramRaster object. |
| 157 | See: android.renderscript.ProgramRaster |
| 158 | end: |
| 159 | |
| 160 | type: rs_program_store |
| 161 | size: 32 |
| 162 | simple: _RS_HANDLE |
| 163 | summary: Handle to a ProgramStore |
| 164 | description: |
| 165 | Opaque handle to a RenderScript ProgramStore object. |
| 166 | See: android.renderscript.ProgramStore |
| 167 | end: |
| 168 | |
| 169 | function: rsClearObject |
| 170 | size: 32 |
| 171 | t: rs_mesh, rs_program_fragment, rs_program_vertex, rs_program_raster, rs_program_store, rs_font |
| 172 | ret: void |
| 173 | arg: #1* dst |
| 174 | test: none |
| 175 | end: |
| 176 | |
| 177 | function: rsIsObject |
| 178 | size: 32 |
| 179 | t: rs_mesh, rs_program_fragment, rs_program_vertex, rs_program_raster, rs_program_store, rs_font |
| 180 | ret: bool |
| 181 | arg: #1 v |
| 182 | test: none |
| 183 | end: |
| 184 | |
| 185 | function: rsSetObject |
| 186 | size: 32 |
| 187 | t: rs_mesh, rs_program_fragment, rs_program_vertex, rs_program_raster, rs_program_store, rs_font |
| 188 | ret: void |
| 189 | arg: #1* dst |
| 190 | arg: #1 src |
| 191 | test: none |
Jean-Luc Brouillet | c5184e2 | 2015-03-13 13:51:24 -0700 | [diff] [blame] | 192 | end: |
| 193 | |
| 194 | function: rsgAllocationSyncAll |
| 195 | size: 32 |
| 196 | ret: void |
| 197 | arg: rs_allocation alloc |
| 198 | summary: |
| 199 | description: |
| 200 | Sync the contents of an allocation. |
| 201 | |
| 202 | If the source is specified, sync from memory space specified by source. |
| 203 | |
| 204 | If the source is not specified, sync from its SCRIPT memory space to its HW |
| 205 | memory spaces. |
| 206 | test: none |
| 207 | end: |
| 208 | |
| 209 | function: rsgAllocationSyncAll |
| 210 | version: 14 |
| 211 | size: 32 |
| 212 | ret: void |
| 213 | arg: rs_allocation alloc |
| 214 | arg: rs_allocation_usage_type source |
| 215 | test: none |
| 216 | end: |
| 217 | |
| 218 | function: rsgBindColorTarget |
| 219 | version: 14 |
| 220 | size: 32 |
| 221 | ret: void |
| 222 | arg: rs_allocation colorTarget |
| 223 | arg: uint slot |
| 224 | summary: |
| 225 | description: |
| 226 | Set the color target used for all subsequent rendering calls |
| 227 | test: none |
| 228 | end: |
| 229 | |
| 230 | function: rsgBindConstant |
| 231 | size: 32 |
| 232 | ret: void |
| 233 | arg: rs_program_fragment ps, "program fragment object" |
| 234 | arg: uint slot, "index of the constant buffer on the program" |
| 235 | arg: rs_allocation c, "constants to bind" |
| 236 | summary: |
| 237 | description: |
| 238 | Bind a new Allocation object to a ProgramFragment or ProgramVertex. |
| 239 | The Allocation must be a valid constant input for the Program. |
| 240 | test: none |
| 241 | end: |
| 242 | |
| 243 | function: rsgBindConstant |
| 244 | size: 32 |
| 245 | ret: void |
| 246 | arg: rs_program_vertex pv, "program vertex object" |
| 247 | arg: uint slot |
| 248 | arg: rs_allocation c |
| 249 | test: none |
| 250 | end: |
| 251 | |
| 252 | function: rsgBindDepthTarget |
| 253 | version: 14 |
| 254 | size: 32 |
| 255 | ret: void |
| 256 | arg: rs_allocation depthTarget |
| 257 | summary: |
| 258 | description: |
| 259 | Set the depth target used for all subsequent rendering calls |
| 260 | test: none |
| 261 | end: |
| 262 | |
| 263 | function: rsgBindFont |
| 264 | size: 32 |
| 265 | ret: void |
| 266 | arg: rs_font font, "object to bind" |
| 267 | summary: |
| 268 | description: |
| 269 | Binds the font object to be used for all subsequent font rendering calls |
| 270 | test: none |
| 271 | end: |
| 272 | |
| 273 | function: rsgBindProgramFragment |
| 274 | size: 32 |
| 275 | ret: void |
| 276 | arg: rs_program_fragment pf |
| 277 | summary: |
| 278 | description: |
| 279 | Bind a new ProgramFragment to the rendering context. |
| 280 | test: none |
| 281 | end: |
| 282 | |
| 283 | function: rsgBindProgramRaster |
| 284 | size: 32 |
| 285 | ret: void |
| 286 | arg: rs_program_raster pr |
| 287 | summary: |
| 288 | description: |
| 289 | Bind a new ProgramRaster to the rendering context. |
| 290 | test: none |
| 291 | end: |
| 292 | |
| 293 | function: rsgBindProgramStore |
| 294 | size: 32 |
| 295 | ret: void |
| 296 | arg: rs_program_store ps |
| 297 | summary: |
| 298 | description: |
| 299 | Bind a new ProgramStore to the rendering context. |
| 300 | test: none |
| 301 | end: |
| 302 | |
| 303 | function: rsgBindProgramVertex |
| 304 | size: 32 |
| 305 | ret: void |
| 306 | arg: rs_program_vertex pv |
| 307 | summary: |
| 308 | description: |
| 309 | Bind a new ProgramVertex to the rendering context. |
| 310 | test: none |
| 311 | end: |
| 312 | |
| 313 | function: rsgBindSampler |
| 314 | size: 32 |
| 315 | ret: void |
| 316 | arg: rs_program_fragment fragment |
| 317 | arg: uint slot |
| 318 | arg: rs_sampler sampler |
| 319 | summary: |
| 320 | description: |
| 321 | Bind a new Sampler object to a ProgramFragment. The sampler will |
| 322 | operate on the texture bound at the matching slot. |
| 323 | test: none |
| 324 | end: |
| 325 | |
| 326 | function: rsgBindTexture |
| 327 | size: 32 |
| 328 | ret: void |
| 329 | arg: rs_program_fragment v |
| 330 | arg: uint slot |
| 331 | arg: rs_allocation alloc |
| 332 | summary: |
| 333 | description: |
| 334 | Bind a new Allocation object to a ProgramFragment. The |
| 335 | Allocation must be a valid texture for the Program. The sampling |
| 336 | of the texture will be controled by the Sampler bound at the |
| 337 | matching slot. |
| 338 | test: none |
| 339 | end: |
| 340 | |
| 341 | function: rsgClearAllRenderTargets |
| 342 | version: 14 |
| 343 | size: 32 |
| 344 | ret: void |
| 345 | summary: |
| 346 | description: |
| 347 | Clear all color and depth targets and resume rendering into |
| 348 | the framebuffer |
| 349 | test: none |
| 350 | end: |
| 351 | |
| 352 | function: rsgClearColor |
| 353 | size: 32 |
| 354 | ret: void |
| 355 | arg: float r |
| 356 | arg: float g |
| 357 | arg: float b |
| 358 | arg: float a |
| 359 | summary: |
| 360 | description: |
| 361 | Clears the rendering surface to the specified color. |
| 362 | test: none |
| 363 | end: |
| 364 | |
| 365 | function: rsgClearColorTarget |
| 366 | version: 14 |
| 367 | size: 32 |
| 368 | ret: void |
| 369 | arg: uint slot |
| 370 | summary: |
| 371 | description: |
| 372 | Clear the previously set color target |
| 373 | test: none |
| 374 | end: |
| 375 | |
| 376 | function: rsgClearDepth |
| 377 | size: 32 |
| 378 | ret: void |
| 379 | arg: float value |
| 380 | summary: |
| 381 | description: |
| 382 | Clears the depth suface to the specified value. |
| 383 | test: none |
| 384 | end: |
| 385 | |
| 386 | function: rsgClearDepthTarget |
| 387 | version: 14 |
| 388 | size: 32 |
| 389 | ret: void |
| 390 | summary: |
| 391 | description: |
| 392 | Clear the previously set depth target |
| 393 | test: none |
| 394 | end: |
| 395 | |
| 396 | function: rsgDrawMesh |
| 397 | size: 32 |
| 398 | ret: void |
| 399 | arg: rs_mesh ism, "mesh object to render" |
| 400 | summary: |
| 401 | description: |
| 402 | Draw a mesh using the current context state. |
| 403 | |
| 404 | If primitiveIndex is specified, draw part of a mesh using the current context state. |
| 405 | |
| 406 | If start and len are also specified, draw specified index range of part of a mesh using the current context state. |
| 407 | |
| 408 | Otherwise the whole mesh is rendered. |
| 409 | test: none |
| 410 | end: |
| 411 | |
| 412 | function: rsgDrawMesh |
| 413 | size: 32 |
| 414 | ret: void |
| 415 | arg: rs_mesh ism |
| 416 | arg: uint primitiveIndex, "for meshes that contain multiple primitive groups this parameter specifies the index of the group to draw." |
| 417 | test: none |
| 418 | end: |
| 419 | |
| 420 | function: rsgDrawMesh |
| 421 | size: 32 |
| 422 | ret: void |
| 423 | arg: rs_mesh ism |
| 424 | arg: uint primitiveIndex |
| 425 | arg: uint start, "starting index in the range" |
| 426 | arg: uint len, "number of indices to draw" |
| 427 | test: none |
| 428 | end: |
| 429 | |
| 430 | function: rsgDrawQuad |
| 431 | size: 32 |
| 432 | ret: void |
| 433 | arg: float x1 |
| 434 | arg: float y1 |
| 435 | arg: float z1 |
| 436 | arg: float x2 |
| 437 | arg: float y2 |
| 438 | arg: float z2 |
| 439 | arg: float x3 |
| 440 | arg: float y3 |
| 441 | arg: float z3 |
| 442 | arg: float x4 |
| 443 | arg: float y4 |
| 444 | arg: float z4 |
| 445 | summary: |
| 446 | description: |
| 447 | Low performance utility function for drawing a simple quad. Not intended for |
| 448 | drawing large quantities of geometry. |
| 449 | test: none |
| 450 | end: |
| 451 | |
| 452 | function: rsgDrawQuadTexCoords |
| 453 | size: 32 |
| 454 | ret: void |
| 455 | arg: float x1 |
| 456 | arg: float y1 |
| 457 | arg: float z1 |
| 458 | arg: float u1 |
| 459 | arg: float v1 |
| 460 | arg: float x2 |
| 461 | arg: float y2 |
| 462 | arg: float z2 |
| 463 | arg: float u2 |
| 464 | arg: float v2 |
| 465 | arg: float x3 |
| 466 | arg: float y3 |
| 467 | arg: float z3 |
| 468 | arg: float u3 |
| 469 | arg: float v3 |
| 470 | arg: float x4 |
| 471 | arg: float y4 |
| 472 | arg: float z4 |
| 473 | arg: float u4 |
| 474 | arg: float v4 |
| 475 | summary: |
| 476 | description: |
| 477 | Low performance utility function for drawing a textured quad. Not intended |
| 478 | for drawing large quantities of geometry. |
| 479 | test: none |
| 480 | end: |
| 481 | |
| 482 | function: rsgDrawRect |
| 483 | size: 32 |
| 484 | ret: void |
| 485 | arg: float x1 |
| 486 | arg: float y1 |
| 487 | arg: float x2 |
| 488 | arg: float y2 |
| 489 | arg: float z |
| 490 | summary: |
| 491 | description: |
| 492 | Low performance utility function for drawing a simple rectangle. Not |
| 493 | intended for drawing large quantities of geometry. |
| 494 | test: none |
| 495 | end: |
| 496 | |
| 497 | function: rsgDrawSpriteScreenspace |
| 498 | size: 32 |
| 499 | ret: void |
| 500 | arg: float x |
| 501 | arg: float y |
| 502 | arg: float z |
| 503 | arg: float w |
| 504 | arg: float h |
| 505 | summary: |
| 506 | description: |
| 507 | Low performance function for drawing rectangles in screenspace. This |
| 508 | function uses the default passthough ProgramVertex. Any bound ProgramVertex |
| 509 | is ignored. This function has considerable overhead and should not be used |
| 510 | for drawing in shipping applications. |
| 511 | test: none |
| 512 | end: |
| 513 | |
| 514 | function: rsgDrawText |
| 515 | size: 32 |
| 516 | ret: void |
| 517 | arg: const char* text |
| 518 | arg: int x |
| 519 | arg: int y |
| 520 | summary: |
| 521 | description: |
| 522 | Draws text given a string and location |
| 523 | test: none |
| 524 | end: |
| 525 | |
| 526 | function: rsgDrawText |
| 527 | size: 32 |
| 528 | ret: void |
| 529 | arg: rs_allocation alloc |
| 530 | arg: int x |
| 531 | arg: int y |
| 532 | test: none |
| 533 | end: |
| 534 | |
| 535 | function: rsgFinish |
| 536 | version: 14 |
| 537 | size: 32 |
| 538 | ret: uint |
| 539 | summary: |
| 540 | description: |
| 541 | Force RenderScript to finish all rendering commands |
| 542 | test: none |
| 543 | end: |
| 544 | |
| 545 | function: rsgFontColor |
| 546 | size: 32 |
| 547 | ret: void |
| 548 | arg: float r, "red component" |
| 549 | arg: float g, "green component" |
| 550 | arg: float b, "blue component" |
| 551 | arg: float a, "alpha component" |
| 552 | summary: |
| 553 | description: |
| 554 | Sets the font color for all subsequent rendering calls |
| 555 | test: none |
| 556 | end: |
| 557 | |
| 558 | function: rsgGetHeight |
| 559 | size: 32 |
| 560 | ret: uint |
| 561 | summary: |
| 562 | description: |
| 563 | Get the height of the current rendering surface. |
| 564 | test: none |
| 565 | end: |
| 566 | |
| 567 | function: rsgGetWidth |
| 568 | size: 32 |
| 569 | ret: uint |
| 570 | summary: |
| 571 | description: |
| 572 | Get the width of the current rendering surface. |
| 573 | test: none |
| 574 | end: |
| 575 | |
| 576 | function: rsgMeasureText |
| 577 | size: 32 |
| 578 | ret: void |
| 579 | arg: const char* text |
| 580 | arg: int* left |
| 581 | arg: int* right |
| 582 | arg: int* top |
| 583 | arg: int* bottom |
| 584 | summary: |
| 585 | description: |
| 586 | Returns the bounding box of the text relative to (0, 0) |
| 587 | Any of left, right, top, bottom could be NULL |
| 588 | test: none |
| 589 | end: |
| 590 | |
| 591 | function: rsgMeasureText |
| 592 | size: 32 |
| 593 | ret: void |
| 594 | arg: rs_allocation alloc |
| 595 | arg: int* left |
| 596 | arg: int* right |
| 597 | arg: int* top |
| 598 | arg: int* bottom |
| 599 | test: none |
| 600 | end: |
| 601 | |
| 602 | function: rsgMeshComputeBoundingBox |
| 603 | size: 32 |
| 604 | ret: void |
| 605 | arg: rs_mesh mesh |
| 606 | arg: float* minX |
| 607 | arg: float* minY |
| 608 | arg: float* min |
| 609 | arg: float* maxX |
| 610 | arg: float* maxY |
| 611 | arg: float* maxZ |
| 612 | summary: |
| 613 | description: |
| 614 | Computes an axis aligned bounding box of a mesh object |
| 615 | test: none |
| 616 | end: |
| 617 | |
| 618 | function: rsgMeshComputeBoundingBox |
| 619 | size: 32 |
| 620 | attrib: always_inline |
| 621 | ret: void |
| 622 | arg: rs_mesh mesh |
| 623 | arg: float3* bBoxMin |
| 624 | arg: float3* bBoxMax |
| 625 | inline: |
| 626 | float x1, y1, z1, x2, y2, z2; |
| 627 | rsgMeshComputeBoundingBox(mesh, &x1, &y1, &z1, &x2, &y2, &z2); |
| 628 | bBoxMin->x = x1; |
| 629 | bBoxMin->y = y1; |
| 630 | bBoxMin->z = z1; |
| 631 | bBoxMax->x = x2; |
| 632 | bBoxMax->y = y2; |
| 633 | bBoxMax->z = z2; |
| 634 | test: none |
| 635 | end: |
| 636 | |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame^] | 637 | function: rsgMeshGetIndexAllocation |
| 638 | version: 16 |
| 639 | size: 32 |
| 640 | ret: rs_allocation, "allocation containing index data" |
| 641 | arg: rs_mesh m, "mesh to get data from" |
| 642 | arg: uint32_t index, "index of the index allocation" |
| 643 | summary: |
| 644 | description: |
| 645 | Returns an allocation containing index data or a null |
| 646 | allocation if only the primitive is specified |
| 647 | test: none |
| 648 | end: |
| 649 | |
| 650 | function: rsgMeshGetPrimitive |
| 651 | version: 16 |
| 652 | size: 32 |
| 653 | ret: rs_primitive, "primitive describing how the mesh is rendered" |
| 654 | arg: rs_mesh m, "mesh to get data from" |
| 655 | arg: uint32_t index, "index of the primitive" |
| 656 | summary: |
| 657 | description: |
| 658 | Returns the primitive describing how a part of the mesh is |
| 659 | rendered |
| 660 | test: none |
| 661 | end: |
| 662 | |
| 663 | function: rsgMeshGetPrimitiveCount |
| 664 | version: 16 |
| 665 | size: 32 |
| 666 | ret: uint32_t, "number of primitive groups in the mesh. This would include simple primitives as well as allocations containing index data" |
| 667 | arg: rs_mesh m, "mesh to get data from" |
| 668 | summary: |
| 669 | description: |
| 670 | Meshes could have multiple index sets, this function returns |
| 671 | the number. |
| 672 | test: none |
| 673 | end: |
| 674 | |
| 675 | function: rsgMeshGetVertexAllocation |
| 676 | version: 16 |
| 677 | size: 32 |
| 678 | ret: rs_allocation, "allocation containing vertex data" |
| 679 | arg: rs_mesh m, "mesh to get data from" |
| 680 | arg: uint32_t index, "index of the vertex allocation" |
| 681 | summary: |
| 682 | description: |
| 683 | Returns an allocation that is part of the mesh and contains |
| 684 | vertex data, e.g. positions, normals, texcoords |
| 685 | test: none |
| 686 | end: |
| 687 | |
| 688 | function: rsgMeshGetVertexAllocationCount |
| 689 | version: 16 |
| 690 | size: 32 |
| 691 | ret: uint32_t, "number of allocations in the mesh that contain vertex data" |
| 692 | arg: rs_mesh m, "mesh to get data from" |
| 693 | summary: |
| 694 | description: |
| 695 | Returns the number of allocations in the mesh that contain |
| 696 | vertex data |
| 697 | test: none |
| 698 | end: |
Jean-Luc Brouillet | c5184e2 | 2015-03-13 13:51:24 -0700 | [diff] [blame] | 699 | |
| 700 | function: rsgProgramFragmentConstantColor |
| 701 | size: 32 |
| 702 | ret: void |
| 703 | arg: rs_program_fragment pf |
| 704 | arg: float r |
| 705 | arg: float g |
| 706 | arg: float b |
| 707 | arg: float a |
| 708 | summary: |
| 709 | description: |
| 710 | Set the constant color for a fixed function emulation program. |
| 711 | test: none |
| 712 | end: |
| 713 | |
| 714 | function: rsgProgramVertexGetProjectionMatrix |
| 715 | size: 32 |
| 716 | ret: void |
| 717 | arg: rs_matrix4x4* proj, "matrix to store the current projection matrix into" |
| 718 | summary: |
| 719 | description: |
| 720 | Get the projection matrix for a currently bound fixed function |
| 721 | vertex program. Calling this function with a custom vertex shader |
| 722 | would result in an error. |
| 723 | test: none |
| 724 | end: |
| 725 | |
| 726 | function: rsgProgramVertexLoadModelMatrix |
| 727 | size: 32 |
| 728 | ret: void |
| 729 | arg: const rs_matrix4x4* model, "model matrix" |
| 730 | summary: |
| 731 | description: |
| 732 | Load the model matrix for a currently bound fixed function |
| 733 | vertex program. Calling this function with a custom vertex shader |
| 734 | would result in an error. |
| 735 | test: none |
| 736 | end: |
| 737 | |
| 738 | function: rsgProgramVertexLoadProjectionMatrix |
| 739 | size: 32 |
| 740 | ret: void |
| 741 | arg: const rs_matrix4x4* proj, "projection matrix" |
| 742 | summary: |
| 743 | description: |
| 744 | Load the projection matrix for a currently bound fixed function |
| 745 | vertex program. Calling this function with a custom vertex shader |
| 746 | would result in an error. |
| 747 | test: none |
| 748 | end: |
| 749 | |
| 750 | function: rsgProgramVertexLoadTextureMatrix |
| 751 | size: 32 |
| 752 | ret: void |
| 753 | arg: const rs_matrix4x4* tex, "texture matrix" |
| 754 | summary: |
| 755 | description: |
| 756 | Load the texture matrix for a currently bound fixed function |
| 757 | vertex program. Calling this function with a custom vertex shader |
| 758 | would result in an error. |
| 759 | test: none |
| 760 | end: |
| 761 | |
Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame^] | 762 | function: rsgProgramRasterGetCullMode |
| 763 | version: 16 |
| 764 | size: 32 |
| 765 | ret: rs_cull_mode |
| 766 | arg: rs_program_raster pr, "program raster to query" |
| 767 | summary: |
| 768 | description: |
| 769 | Get program raster cull mode |
| 770 | test: none |
| 771 | end: |
| 772 | |
| 773 | function: rsgProgramRasterIsPointSpriteEnabled |
| 774 | version: 16 |
| 775 | size: 32 |
| 776 | ret: bool |
| 777 | arg: rs_program_raster pr, "program raster to query" |
| 778 | summary: |
| 779 | description: |
| 780 | Get program raster point sprite state |
| 781 | test: none |
| 782 | end: |
| 783 | |
| 784 | function: rsgProgramStoreGetBlendDstFunc |
| 785 | version: 16 |
| 786 | size: 32 |
| 787 | ret: rs_blend_dst_func |
| 788 | arg: rs_program_store ps, "program store to query" |
| 789 | summary: |
| 790 | description: |
| 791 | Get program store blend destination function |
| 792 | test: none |
| 793 | end: |
| 794 | |
| 795 | function: rsgProgramStoreGetBlendSrcFunc |
| 796 | version: 16 |
| 797 | size: 32 |
| 798 | ret: rs_blend_src_func |
| 799 | arg: rs_program_store ps, "program store to query" |
| 800 | summary: |
| 801 | description: |
| 802 | Get program store blend source function |
| 803 | test: none |
| 804 | end: |
| 805 | |
| 806 | function: rsgProgramStoreGetDepthFunc |
| 807 | version: 16 |
| 808 | size: 32 |
| 809 | ret: rs_depth_func |
| 810 | arg: rs_program_store ps, "program store to query" |
| 811 | summary: |
| 812 | description: |
| 813 | Get program store depth function |
| 814 | test: none |
| 815 | end: |
| 816 | |
| 817 | function: rsgProgramStoreIsColorMaskAlphaEnabled |
| 818 | version: 16 |
| 819 | size: 32 |
| 820 | ret: bool |
| 821 | arg: rs_program_store ps, "program store to query" |
| 822 | summary: |
| 823 | description: |
| 824 | Get program store alpha component color mask |
| 825 | test: none |
| 826 | end: |
| 827 | |
| 828 | function: rsgProgramStoreIsColorMaskBlueEnabled |
| 829 | version: 16 |
| 830 | size: 32 |
| 831 | ret: bool |
| 832 | arg: rs_program_store ps, "program store to query" |
| 833 | summary: |
| 834 | description: |
| 835 | Get program store blur component color mask |
| 836 | test: none |
| 837 | end: |
| 838 | |
| 839 | function: rsgProgramStoreIsColorMaskGreenEnabled |
| 840 | version: 16 |
| 841 | size: 32 |
| 842 | ret: bool |
| 843 | arg: rs_program_store ps, "program store to query" |
| 844 | summary: |
| 845 | description: |
| 846 | Get program store green component color mask |
| 847 | test: none |
| 848 | end: |
| 849 | |
| 850 | function: rsgProgramStoreIsColorMaskRedEnabled |
| 851 | version: 16 |
| 852 | size: 32 |
| 853 | ret: bool |
| 854 | arg: rs_program_store ps, "program store to query" |
| 855 | summary: |
| 856 | description: |
| 857 | Get program store red component color mask |
| 858 | test: none |
| 859 | end: |
| 860 | |
| 861 | function: rsgProgramStoreIsDepthMaskEnabled |
| 862 | version: 16 |
| 863 | size: 32 |
| 864 | ret: bool |
| 865 | arg: rs_program_store ps, "program store to query" |
| 866 | summary: |
| 867 | description: |
| 868 | Get program store depth mask |
| 869 | test: none |
| 870 | end: |
| 871 | |
| 872 | function: rsgProgramStoreIsDitherEnabled |
| 873 | version: 16 |
| 874 | size: 32 |
| 875 | ret: bool |
| 876 | arg: rs_program_store ps, "program store to query" |
| 877 | summary: |
| 878 | description: |
| 879 | Get program store dither state |
| 880 | test: none |
| 881 | end: |