|
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
|
Back-to-front sorting for transparent billboard geometry. More...
Go to the source code of this file.
Data Structures | |
| struct | BillboardSortEntry |
| Lightweight proxy for sorting data without moving large structs. More... | |
| struct | BillboardSorter |
| Reusable memory context for sorting operations. More... | |
Functions | |
| void | billboard_sorter_init (BillboardSorter *sorter, int initial_capacity) |
| Allocates internal buffers for the sorter. | |
| void | billboard_sorter_cleanup (BillboardSorter *sorter) |
| Destroys the sorter context. | |
| GLuint | billboard_sorter_sort_gpu (BillboardSorter *sorter, const SphereInstance *instances, int count, const vec3 camera_pos) |
| Sorts the array of instances Back-to-Front (descending depth) on GPU. | |
| GLuint | billboard_sorter_sort_cpu (BillboardSorter *sorter, const SphereInstance *instances, int count, const vec3 camera_pos) |
| Sorts the array of instances Back-to-Front (descending depth) on CPU. | |
| GLuint | billboard_sorter_sort_cpu_radix (BillboardSorter *sorter, const SphereInstance *instances, int count, const vec3 camera_pos) |
| Sorts the array of instances Back-to-Front (descending depth) using Radix Sort. | |
| GLuint | billboard_sorter_sort (BillboardSorter *sorter, const SphereInstance *instances, int count, const vec3 camera_pos, SortingMode mode) |
| Dispatches the sorting task using the specified SortingMode. | |
Back-to-front sorting for transparent billboard geometry.
| void billboard_sorter_cleanup | ( | BillboardSorter * | sorter | ) |
Destroys the sorter context.
| sorter | Pointer to the struct. |
| void billboard_sorter_init | ( | BillboardSorter * | sorter, |
| int | initial_capacity | ||
| ) |
Allocates internal buffers for the sorter.
| sorter | Pointer to the struct. |
| initial_capacity | Expected number of instances. |
| GLuint billboard_sorter_sort | ( | BillboardSorter * | sorter, |
| const SphereInstance * | instances, | ||
| int | count, | ||
| const vec3 | camera_pos, | ||
| SortingMode | mode | ||
| ) |
Dispatches the sorting task using the specified SortingMode.
| sorter | Memory context. |
| instances | Array of instances. |
| count | Active element count. |
| camera_pos | World-space viewer position. |
| mode | Sorting algorithm choice. |
| GLuint billboard_sorter_sort_cpu | ( | BillboardSorter * | sorter, |
| const SphereInstance * | instances, | ||
| int | count, | ||
| const vec3 | camera_pos | ||
| ) |
Sorts the array of instances Back-to-Front (descending depth) on CPU.
| sorter | Memory context. |
| instances | Array of instances (will be copied and sorted internally). |
| count | Active element count. |
| camera_pos | World-space viewer position. |
| GLuint billboard_sorter_sort_cpu_radix | ( | BillboardSorter * | sorter, |
| const SphereInstance * | instances, | ||
| int | count, | ||
| const vec3 | camera_pos | ||
| ) |
Sorts the array of instances Back-to-Front (descending depth) using Radix Sort.
| sorter | Memory context. |
| instances | Array of instances. |
| count | Active element count. |
| camera_pos | World-space viewer position (for depth). |
| GLuint billboard_sorter_sort_gpu | ( | BillboardSorter * | sorter, |
| const SphereInstance * | instances, | ||
| int | count, | ||
| const vec3 | camera_pos | ||
| ) |
Sorts the array of instances Back-to-Front (descending depth) on GPU.
| sorter | Memory context. |
| instances | Pointer to the array of instances to upload. |
| count | Active element count. |
| camera_pos | World-space viewer position. |