diff options
Diffstat (limited to 'src/core/clip.h')
-rw-r--r-- | src/core/clip.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/clip.h b/src/core/clip.h index c1bb7b6..076d3ab 100644 --- a/src/core/clip.h +++ b/src/core/clip.h @@ -10,15 +10,15 @@ typedef struct { /*clipping coord*/ Vec4 clip_coord; - /*vertex data*/ - Vert vertex; + /*new index*/ + uint index; } ClippedVert; #define CLIP_BUFFER_SIZE 6 typedef struct { + uint count; /*number of resulting vertices*/ ClippedVert vertices[CLIP_BUFFER_SIZE]; - uint count; /*temp register*/ float temp_reg_num[REG_NUM_COUNT][CLIP_BUFFER_SIZE]; Vec2 temp_reg_v2[REG_V2_COUNT][CLIP_BUFFER_SIZE]; @@ -27,9 +27,8 @@ typedef struct { } ClippedBuffer; ClippedBuffer clip_buffer; /*clipping result*/ -ClippedBuffer temp_clip_buffer; -bool clip_triangle(Vec4* c0, Vec4* c1, Vec4* c2, Vert* v0, Vert* v1, Vert* v2, uint varying_flag, ClippedBuffer* clipped); +bool clip_triangle(Vec4* c0, Vec4* c1, Vec4* c2, uint i0, uint i1, uint i2, uint varying_flag, ClippedBuffer* clipped); uint clip_line(); |