|
Blender V5.3
|
Classes | |
| struct | Resources |
Functions | |
| void | gen_points (const Resources &srt, const uint3 global_id, const uint3 num_groups) |
| void | gen_lines (const Resources &srt, const uint3 global_id, const uint3 num_groups) |
| void | gen_triangles (const Resources &srt, const uint3 global_id, const uint3 num_groups) |
Constructs a 2D array index buffer with 'ncurves' rows and 'elements_per_curve*2' columns. Each row contains 'elements_per_curve' pairs of indexes. e.g., for elements_per_curve=32, first two rows are 0 1 1 2 2 3 ... 31 32 33 34 34 35 35 36 .. 64 65 The index buffer can then be used to draw 'ncurves' curves with 'elements_per_curve+1' vertexes each, using GL_LINES primitives. Intended to be used if GL_LINE_STRIP primitives can't be used for some reason.
Definition at line 52 of file gpu_shader_index_gen.bsl.hh.
References compute, gen_lines(), global_invocation_id, INDEX_GEN_GROUP_SIZE, local_size, num_work_groups, resource_table, int3::x, x, int3::y, y, and int3::z.
Referenced by gen_lines().
Constructs a simple 2D array index buffer, with 'ncurves' rows and 'elements_per_curve' columns. Each row contains 'elements_per_curve-1' indexes and a restart index. The index buffer can then be used to draw either 'ncurves' lines with 'elements_per_curve-1' vertexes each, or 'ncurves' triangle strips with 'elements_per_curve-3' triangles each.
Definition at line 25 of file gpu_shader_index_gen.bsl.hh.
References compute, gen_points(), global_invocation_id, INDEX_GEN_GROUP_SIZE, local_size, num_work_groups, resource_table, int3::x, x, int3::y, y, and int3::z.
Referenced by gen_points().
| void index_gen::gen_triangles | ( | const Resources & | srt, |
| const uint3 | global_id, | ||
| const uint3 | num_groups ) |
Constructs a 2D array index buffer, with 'ncurves' rows and 'elements_per_curve*6' columns. The index buffer can be used to draw 'ncurves' triangle strips with 'elements_per_curve*2' triangles each, using GL_TRIANGLES primitives. Intended to be used if GL_TRIANGLE_STRIP primitives can't be used for some reason.
Definition at line 75 of file gpu_shader_index_gen.bsl.hh.
References compute, gen_triangles(), global_invocation_id, INDEX_GEN_GROUP_SIZE, local_size, num_work_groups, resource_table, int3::x, x, int3::y, y, and int3::z.
Referenced by gen_triangles().