Explorar o código

early_out_fz not such a great idea

David Rose %!s(int64=17) %!d(string=hai) anos
pai
achega
0031ee4766
Modificáronse 2 ficheiros con 0 adicións e 56 borrados
  1. 0 2
      panda/src/tinydisplay/ztriangle.h
  2. 0 54
      panda/src/tinydisplay/ztriangle_two.h

+ 0 - 2
panda/src/tinydisplay/ztriangle.h

@@ -69,8 +69,6 @@
     return;
   fz = 1.0f / fz;
 
-  EARLY_OUT_FZ();
-
   fdx1 *= fz;
   fdy1 *= fz;
   fdx2 *= fz;

+ 0 - 54
panda/src/tinydisplay/ztriangle_two.h

@@ -7,10 +7,6 @@ static void FNAME(white_untextured) (ZBuffer *zb,
   {						\
   }
 
-#define EARLY_OUT_FZ() 				\
-  {						\
-  }
-
 #define DRAW_INIT()                             \
   {                                             \
   }
@@ -40,10 +36,6 @@ static void FNAME(flat_untextured) (ZBuffer *zb,
   {						\
   }
 
-#define EARLY_OUT_FZ() 				\
-  {						\
-  }
-
 #define DRAW_INIT()                             \
   {                                             \
     if (!ACMP(zb, p2->a)) {                     \
@@ -92,10 +84,6 @@ static void FNAME(smooth_untextured) (ZBuffer *zb,
       return;                                           \
     }                                                   \
   }
-
-#define EARLY_OUT_FZ() 				\
-  {						\
-  }
   
 #define DRAW_INIT() 				\
   {						\
@@ -132,10 +120,6 @@ static void FNAME(white_textured) (ZBuffer *zb,
   {						\
   }
 
-#define EARLY_OUT_FZ() 				\
-  {						\
-  }
-
 #define DRAW_INIT()				\
   {						\
     texture_levels = zb->current_texture;       \
@@ -172,10 +156,6 @@ static void FNAME(flat_textured) (ZBuffer *zb,
   {						\
   }
 
-#define EARLY_OUT_FZ() 				\
-  {						\
-  }
-
 #define DRAW_INIT()				\
   {						\
     if (p2->a == 0 && !ACMP(zb, p2->a)) {       \
@@ -243,10 +223,6 @@ static void FNAME(smooth_textured) (ZBuffer *zb,
     }                                                   \
   }
 
-#define EARLY_OUT_FZ() 				\
-  {						\
-  }
-
 #define DRAW_INIT()                             \
   {                                             \
     texture_levels = zb->current_texture;       \
@@ -303,16 +279,6 @@ static void FNAME(white_perspective) (ZBuffer *zb,
   {						\
   }
 
-#define EARLY_OUT_FZ()                                                  \
-  {                                                                     \
-    if (fz > 0.001 || fz < -.001) {                                     \
-      /* This triangle is small enough not to worry about perspective   \
-         correction. */                                                 \
-      FNAME(white_textured)(zb, p0, p1, p2);                            \
-      return;                                                           \
-    }                                                                   \
-  }
-
 #define DRAW_INIT()				\
   {						\
     texture_levels = zb->current_texture;       \
@@ -421,16 +387,6 @@ static void FNAME(flat_perspective) (ZBuffer *zb,
   {						\
   }
 
-#define EARLY_OUT_FZ()                                                  \
-  {                                                                     \
-    if (fz > 0.001 || fz < -.001) {                                     \
-      /* This triangle is small enough not to worry about perspective   \
-         correction. */                                                 \
-      FNAME(flat_textured)(zb, p0, p1, p2);                             \
-      return;                                                           \
-    }                                                                   \
-  }
-
 #define DRAW_INIT() 				\
   {						\
     if (p2->a == 0 && !ACMP(zb, p2->a)) {       \
@@ -572,16 +528,6 @@ static void FNAME(smooth_perspective) (ZBuffer *zb,
     }                                                   \
   }
 
-#define EARLY_OUT_FZ()                                                  \
-  {                                                                     \
-    if (fz > 0.001 || fz < -.001) {                                     \
-      /* This triangle is small enough not to worry about perspective   \
-         correction. */                                                 \
-      FNAME(smooth_textured)(zb, p0, p1, p2);                           \
-      return;                                                           \
-    }                                                                   \
-  }
-
 #define DRAW_INIT() 				\
   {						\
     texture_levels = zb->current_texture;       \