Finalise implementing triangle clipping
This commit is contained in:
1 parent
00e7293b28
commit
f6f2483b61
2 files changed
+160
-33
No files matched your search
@@ -8,10 +8,12 @@
|
||||
#include "vector/vec.h"
|
||||
#include "window/window.h"
|
||||
|
||||
#define INVALID_VERTEX -1
|
||||
|
||||
typedef struct {
|
||||
u64 idx0;
|
||||
u64 idx1;
|
||||
u64 idx2;
|
||||
i64 idx0;
|
||||
i64 idx1;
|
||||
i64 idx2;
|
||||
colour_t colour;
|
||||
} scene_triangle_t;
|
||||
|
||||
@@ -41,8 +43,6 @@ typedef struct {
|
||||
list_scene_triangle_t *triangles;
|
||||
} model_t;
|
||||
#define NULL_MODEL ((model_t){0})
|
||||
#define IS_NULL_MODEL(MODEL_PTR) \
|
||||
(MODEL_PTR->vertices == NULL && MODEL_PTR->triangles == NULL)
|
||||
|
||||
typedef struct {
|
||||
f32 scale;
|
||||
@@ -79,5 +79,6 @@ void draw_wireframe_triangle(window_t *wnd, Arena *arena, triangle_t triangle);
|
||||
void draw_filled_triangle(window_t *wnd, Arena *arena, triangle_t triangle);
|
||||
void draw_shaded_triangle(window_t *wnd, Arena *arena, triangle_t triangle);
|
||||
void draw_line(window_t *wnd, Arena *arena, line_t line, colour_t colour);
|
||||
bool is_null_model(const model_t *model);
|
||||
|
||||
#endif // !RASTERISER_H
|
||||
Reference in new issue
Block a user