feat: add rasterization pipeline

This commit is contained in:
2026-03-04 20:01:06 +05:30
parent faa3f941d0
commit d57b2e2114
9 changed files with 163 additions and 72 deletions

View File

@@ -45,3 +45,13 @@ void vektor_polygon_free(VektorPolygon *pg) {
free(pg->points);
free(pg);
}
void vektor_primitivebuffer_add_primitive(VektorPrimitiveBuffer *buffer,
VektorPrimitive prim) {
if (buffer->count >= buffer->capacity) {
buffer->capacity = buffer->capacity ? buffer->capacity * 2 : 4;
buffer->primitives =
realloc(buffer->primitives, sizeof(VektorPrimitive) * buffer->capacity);
}
buffer->primitives[buffer->count++] = prim;
}