add point/line/polygon state
authorBrian <brian.paul@tungstengraphics.com>
Tue, 19 Jun 2007 14:43:05 +0000 (08:43 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 19 Jun 2007 14:43:05 +0000 (08:43 -0600)
src/mesa/pipe/p_defines.h
src/mesa/pipe/p_state.h

index 11b7017..550240e 100644 (file)
 #define PIPE_FUNC_GEQUAL   6
 #define PIPE_FUNC_ALWAYS   7
 
+/** Polygon fill mode */
+#define PIPE_POLYGON_MODE_FILL  0
+#define PIPE_POLYGON_MODE_LINE  1
+#define PIPE_POLYGON_MODE_POINT 2
+
+/** Polygon cull mode */
+#define PIPE_POLYGON_CULL_NONE  0
+#define PIPE_POLYGON_CULL_FRONT 1
+#define PIPE_POLYGON_CULL_BACK  2
+#define PIPE_POLYGON_CULL_BOTH  3
+
+/** Polygon front winding order */
+#define PIPE_POLYGON_FRONT_CW   0
+#define PIPE_POLYGON_FRONT_CCW  1
+
 #define PIPE_STENCIL_OP_KEEP       0
 #define PIPE_STENCIL_OP_ZERO       1
 #define PIPE_STENCIL_OP_REPLACE    2
index 71f1e99..c88c0de 100644 (file)
@@ -133,6 +133,32 @@ struct pipe_blend_color {
    GLfloat color[4];
 };
 
+struct pipe_line_state
+{
+   GLuint smooth:1;
+   GLuint stipple:1;
+   GLushort stipple_pattern;
+   GLint stipple_factor;
+   GLfloat width;
+};
+
+struct pipe_point_state
+{
+   GLuint smooth:1;
+   GLfloat size;
+   GLfloat min_size, max_size;
+   GLfloat attenuation[3];
+};
+
+struct pipe_polygon_state {
+   GLuint cull_mode:2;     /**< PIPE_POLYGON_CULL_x */
+   GLuint front_winding:1; /**< PIPE_POLYGON_FRONT_CCW,CW */
+   GLuint front_mode:2;    /**< PIPE_POLYGON_MODE_x */
+   GLuint back_mode:2;     /**< PIPE_POLYGON_MODE_x */
+   GLuint stipple:1;       /**< enable */
+   GLuint smooth:1;        /**< enable */
+   /* XXX Polygon offset? */
+};
 
 struct pipe_stencil_state {
    GLuint front_enabled:1;