use BCOPY macro on FreeBSD
[mesa.git] / src / mesa / main / config.h
index a80c74dc1b24084e3078d55e80eea4ef3a4ba774..0a25acc69f9a2a79a15aaf5bd6394b60b2997be1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: config.h,v 1.5 2000/02/03 19:40:35 brianp Exp $ */
+/* $Id: config.h,v 1.8 2000/03/16 07:36:33 keithw Exp $ */
 
 /*
  * Mesa 3-D graphics library
 
 
 /*
- * Bits per depth buffer value:  16 or 32
+ * Bits per depth buffer value:  16 or 32 (GLushort or GLuint)
+ * gl_create_visual() can select any depth in [0, 32].
  */
-#ifdef MESAD3D
-   /* Mesa / Direct3D driver only */
-   extern float g_DepthScale, g_MaxDepth;
-#  define DEPTH_BITS   32
-#  define DEPTH_SCALE  g_DepthScale
-#  define MAX_DEPTH    g_MaxDepth
-#else
-#  define DEPTH_BITS 16
-#  if DEPTH_BITS==16
-#     define MAX_DEPTH 0xffff
-#     define DEPTH_SCALE 65535.0F
-#  elif DEPTH_BITS==32
-#     define MAX_DEPTH 0x3fffffff
-#     define DEPTH_SCALE ((GLfloat) MAX_DEPTH)
-#  else
-#     error "illegal number of depth bits"
-#  endif
-#endif
+#define DEFAULT_SOFTWARE_DEPTH_BITS 16
+#define DEFAULT_SOFTWARE_DEPTH_TYPE GLushort
+
 
 
 /*
  * Bits per color channel (must be 8 at this time!)
  */
 #define CHAN_BITS 8
-
+#define CHAN_MAX ((1 << CHAN_BITS) - 1)
+#define CHAN_MAXF ((GLfloat) CHAN_MAX)
 
 
 /*
  * VB_MAX vertices.  (This only happens when mixed primitives are
  * sharing the vb).  
  */
-#define VB_MAX_CLIPPED_VERTS (2 * (6 + MAX_CLIP_PLANES))
+#define VB_MAX_CLIPPED_VERTS ((2 * (6 + MAX_CLIP_PLANES))+1)
 #define VB_SIZE  (VB_MAX + VB_MAX_CLIPPED_VERTS)