|
Gama C Library
Gama C API Documentation
|
Structure representing the 2D projected output of a 3D scene. More...
#include <image.h>
Data Fields | |
| gmPos * | vertices |
| gmColor * | colors |
| size_t * | triangles |
| double * | depths |
| size_t | n_vertices |
| size_t | n_colors |
| size_t | n_triangles |
| size_t | cap_vertices |
| size_t | cap_colors |
| size_t | cap_triangles |
| size_t | cap_depths |
| struct { | |
| gm3Pos * world_verts | |
| size_t cap_world | |
| void * sort_buf | |
| size_t cap_sort | |
| double * tri | |
| gmColor * cols | |
| size_t cap_tri | |
| } | _internal |
Structure representing the 2D projected output of a 3D scene.
This struct acts as a buffer containing the 2D screen-space coordinates, colors, and indices of triangles generated by the 3D projection pipeline. It also manages internal scratch buffers for optimization.
| struct { ... } gm3Image::_internal |
Internal scratch buffers for rendering optimizations.
| size_t gm3Image::cap_colors |
Allocated capacity for colors array.
| size_t gm3Image::cap_depths |
Allocated capacity for depths array.
| size_t gm3Image::cap_sort |
Allocated capacity for sort_buf.
| size_t gm3Image::cap_tri |
Allocated capacity for tri and cols.
| size_t gm3Image::cap_triangles |
Allocated capacity for triangles (indices) array.
| size_t gm3Image::cap_vertices |
Allocated capacity for vertices array.
| size_t gm3Image::cap_world |
Allocated capacity for world_verts.
| gmColor* gm3Image::colors |
Array of colors, one per triangle.
| gmColor* gm3Image::cols |
Temp storage for sorted triangle colors.
| double* gm3Image::depths |
Array of average Z-depths, one per triangle, used for sorting.
| size_t gm3Image::n_colors |
Current number of colors stored (should match n_triangles).
| size_t gm3Image::n_triangles |
Current number of triangles stored.
| size_t gm3Image::n_vertices |
Current number of vertices stored.
| void* gm3Image::sort_buf |
Temp storage for sorting triangles by depth.
| double* gm3Image::tri |
Temp storage for sorted triangle vertex data (x1,y1,x2,y2,x3,y3).
| size_t* gm3Image::triangles |
Array of vertex indices, 3 per triangle.
| gmPos* gm3Image::vertices |
Array of 2D screen-space vertex positions.
| gm3Pos* gm3Image::world_verts |
Temp storage for 3D world coordinates before projection.