summaryrefslogtreecommitdiff
path: root/src/core/clip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/clip.c')
-rw-r--r--src/core/clip.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/core/clip.c b/src/core/clip.c
index 071b14b..382c766 100644
--- a/src/core/clip.c
+++ b/src/core/clip.c
@@ -1,8 +1,6 @@
#include "clip.h"
#include "shader.h"
-/*from mesa3d*/
-
typedef enum {
POSITIVE_W,
POSITIVE_X,
@@ -131,12 +129,11 @@ static bool clip_against_plane(Plane plane, uint varying_flag, ClippedBuffer* sr
}
#define CLIP(plane, from, to) \
-do { \
-is_cull = clip_against_plane(plane, varying_flag, from, to); \
-if (is_cull) { \
- buffer->count = 0;/*cull this triangle*/ \
- return 1; \
-} \
+do { \
+ if (clip_against_plane(plane, varying_flag, from, to)) { \
+ buffer->count = 0;/*cull this triangle*/ \
+ return 1; \
+ } \
}while(0)
bool clip_triangle(Vec4* c0, Vec4* c1, Vec4* c2, Vert* v0, Vert* v1, Vert* v2, uint varying_flag, ClippedBuffer* buffer) {
@@ -189,8 +186,6 @@ bool clip_triangle(Vec4* c0, Vec4* c1, Vec4* c2, Vert* v0, Vert* v1, Vert* v2, u
INIT_CLIP_VERT(2);
#undef INIT_CLIP_VERT
- bool is_cull = FALSE;
-
CLIP(POSITIVE_W, &temp, buffer);
CLIP(POSITIVE_X, buffer, &temp);
CLIP(NEGATIVE_X, &temp, buffer);