|
srp
software rendering pipeline
|
#include "core/buffer_p.h"

Go to the source code of this file.
Functions | |
| size_t | computeTriangleCount (size_t vertexCount, SRPPrimitive prim) |
| void | resolveTriangleTopology (size_t base, size_t rawTriIdx, SRPPrimitive prim, size_t *out) |
| size_t | computeLineCount (size_t vertexCount, SRPPrimitive prim) |
| void | resolveLineTopology (size_t base, size_t rawLineIdx, SRPPrimitive prim, size_t vertexCount, size_t *out) |
Topology-related functions
| size_t computeLineCount | ( | size_t | vertexCount, |
| SRPPrimitive | prim | ||
| ) |
Deduce the number of lines to assemble based on the number of vertices and primitive type
| [in] | vertexCount | Number of vertices |
| [in] | prim | Primitive type |
| void resolveLineTopology | ( | size_t | base, |
| size_t | rawLineIdx, | ||
| SRPPrimitive | prim, | ||
| size_t | vertexCount, | ||
| size_t * | out | ||
| ) |
Determine the stream indices for a line based on its type
| [in] | base | Base stream index |
| [in] | rawLineIdx | Index of the primitive to assemble, starting from 0, including culled/skipped lines |
| [in] | prim | Primitive type |
| [in] | vertexCount | The total amount of stream vertices for this draw call |
| [out] | out | Array of size 2 to store the resulting stream indices |
| void resolveTriangleTopology | ( | size_t | base, |
| size_t | rawTriIdx, | ||
| SRPPrimitive | prim, | ||
| size_t * | out | ||
| ) |
Determine the stream indices for a triangle based on its type
| [in] | base | Base stream index |
| [in] | rawTriIdx | Index of the primitive to assemble, starting from 0, including culled triangles |
| [in] | prim | Primitive type |
| [out] | out | Array of size 3 to store the resulting stream indices |