Blender V5.0
zbuf.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
12struct ZSpan {
13 int rectx, recty; /* range for clipping */
14
15 int miny1, maxy1, miny2, maxy2; /* actual filled in range */
16 const float *minp1, *maxp1, *minp2, *maxp2; /* vertex pointers detect min/max range in */
17 float *span1, *span2;
18};
19
23void zbuf_alloc_span(struct ZSpan *zspan, int rectx, int recty);
24void zbuf_free_span(struct ZSpan *zspan);
25
30void zspan_scanconvert(struct ZSpan *zspan,
31 void *handle,
32 float *v1,
33 float *v2,
34 float *v3,
35 void (*func)(void *, int, int, float, float));
ATTR_WARN_UNUSED_RESULT const BMVert * v2
Definition zbuf.h:12
float * span2
Definition zbuf.h:17
const float * maxp2
Definition zbuf.h:16
int maxy2
Definition zbuf.h:15
int miny1
Definition zbuf.h:15
const float * minp2
Definition zbuf.h:16
const float * maxp1
Definition zbuf.h:16
int maxy1
Definition zbuf.h:15
float * span1
Definition zbuf.h:17
int recty
Definition zbuf.h:13
int miny2
Definition zbuf.h:15
int rectx
Definition zbuf.h:13
const float * minp1
Definition zbuf.h:16
void zspan_scanconvert(struct ZSpan *zspan, void *handle, float *v1, float *v2, float *v3, void(*func)(void *, int, int, float, float))
Definition zbuf.cc:151
void zbuf_alloc_span(struct ZSpan *zspan, int rectx, int recty)
Definition zbuf.cc:33
void zbuf_free_span(struct ZSpan *zspan)
Definition zbuf.cc:44