Drop GLcontext typedef and use struct gl_context instead
[mesa.git] / src / mesa / swrast / swrast.h
index 85a27fd55bf534cdce0011fa63f525cf7c4fcf6d..9b88c70220e1d5abdae1a6d02b2b61de8a59c5a0 100644 (file)
@@ -85,32 +85,32 @@ struct swrast_device_driver;
  */
 
 extern GLboolean
-_swrast_CreateContext( GLcontext *ctx );
+_swrast_CreateContext( struct gl_context *ctx );
 
 extern void
-_swrast_DestroyContext( GLcontext *ctx );
+_swrast_DestroyContext( struct gl_context *ctx );
 
 /* Get a (non-const) reference to the device driver struct for swrast.
  */
 extern struct swrast_device_driver *
-_swrast_GetDeviceDriverReference( GLcontext *ctx );
+_swrast_GetDeviceDriverReference( struct gl_context *ctx );
 
 extern void
-_swrast_Bitmap( GLcontext *ctx,
+_swrast_Bitmap( struct gl_context *ctx,
                GLint px, GLint py,
                GLsizei width, GLsizei height,
                const struct gl_pixelstore_attrib *unpack,
                const GLubyte *bitmap );
 
 extern void
-_swrast_CopyPixels( GLcontext *ctx,
+_swrast_CopyPixels( struct gl_context *ctx,
                    GLint srcx, GLint srcy,
                    GLint destx, GLint desty,
                    GLsizei width, GLsizei height,
                    GLenum type );
 
 extern void
-_swrast_DrawPixels( GLcontext *ctx,
+_swrast_DrawPixels( struct gl_context *ctx,
                    GLint x, GLint y,
                    GLsizei width, GLsizei height,
                    GLenum format, GLenum type,
@@ -118,30 +118,37 @@ _swrast_DrawPixels( GLcontext *ctx,
                    const GLvoid *pixels );
 
 extern void
-_swrast_ReadPixels( GLcontext *ctx,
+_swrast_ReadPixels( struct gl_context *ctx,
                    GLint x, GLint y, GLsizei width, GLsizei height,
                    GLenum format, GLenum type,
                    const struct gl_pixelstore_attrib *unpack,
                    GLvoid *pixels );
 
 extern void
-_swrast_BlitFramebuffer(GLcontext *ctx,
+_swrast_BlitFramebuffer(struct gl_context *ctx,
                         GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
                         GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
                         GLbitfield mask, GLenum filter);
 
 extern void
-_swrast_Clear(GLcontext *ctx, GLbitfield buffers);
+_swrast_Clear(struct gl_context *ctx, GLbitfield buffers);
 
 extern void
-_swrast_Accum(GLcontext *ctx, GLenum op, GLfloat value);
+_swrast_Accum(struct gl_context *ctx, GLenum op, GLfloat value);
 
 
 
 /* Reset the stipple counter
  */
 extern void
-_swrast_ResetLineStipple( GLcontext *ctx );
+_swrast_ResetLineStipple( struct gl_context *ctx );
+
+/**
+ * Indicates front/back facing for subsequent points/lines when drawing
+ * unfilled polygons.  Needed for two-side stencil.
+ */
+extern void
+_swrast_SetFacing(struct gl_context *ctx, GLuint facing);
 
 /* These will always render the correct point/line/triangle for the
  * current state.
@@ -149,115 +156,55 @@ _swrast_ResetLineStipple( GLcontext *ctx );
  * For flatshaded primitives, the provoking vertex is the final one.
  */
 extern void
-_swrast_Point( GLcontext *ctx, const SWvertex *v );
+_swrast_Point( struct gl_context *ctx, const SWvertex *v );
 
 extern void
-_swrast_Line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 );
+_swrast_Line( struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1 );
 
 extern void
-_swrast_Triangle( GLcontext *ctx, const SWvertex *v0,
+_swrast_Triangle( struct gl_context *ctx, const SWvertex *v0,
                   const SWvertex *v1, const SWvertex *v2 );
 
 extern void
-_swrast_Quad( GLcontext *ctx,
+_swrast_Quad( struct gl_context *ctx,
               const SWvertex *v0, const SWvertex *v1,
              const SWvertex *v2,  const SWvertex *v3);
 
 extern void
-_swrast_flush( GLcontext *ctx );
+_swrast_flush( struct gl_context *ctx );
 
 extern void
-_swrast_render_primitive( GLcontext *ctx, GLenum mode );
+_swrast_render_primitive( struct gl_context *ctx, GLenum mode );
 
 extern void
-_swrast_render_start( GLcontext *ctx );
+_swrast_render_start( struct gl_context *ctx );
 
 extern void
-_swrast_render_finish( GLcontext *ctx );
+_swrast_render_finish( struct gl_context *ctx );
 
 /* Tell the software rasterizer about core state changes.
  */
 extern void
-_swrast_InvalidateState( GLcontext *ctx, GLbitfield new_state );
+_swrast_InvalidateState( struct gl_context *ctx, GLbitfield new_state );
 
 /* Configure software rasterizer to match hardware rasterizer characteristics:
  */
 extern void
-_swrast_allow_vertex_fog( GLcontext *ctx, GLboolean value );
+_swrast_allow_vertex_fog( struct gl_context *ctx, GLboolean value );
 
 extern void
-_swrast_allow_pixel_fog( GLcontext *ctx, GLboolean value );
+_swrast_allow_pixel_fog( struct gl_context *ctx, GLboolean value );
 
 /* Debug:
  */
 extern void
-_swrast_print_vertex( GLcontext *ctx, const SWvertex *v );
+_swrast_print_vertex( struct gl_context *ctx, const SWvertex *v );
 
 
-/*
- * Imaging fallbacks (a better solution should be found, perhaps
- * moving all the imaging fallback code to a new module) 
- */
-extern void
-_swrast_CopyConvolutionFilter2D(GLcontext *ctx, GLenum target, 
-                               GLenum internalFormat, 
-                               GLint x, GLint y, GLsizei width, 
-                               GLsizei height);
-extern void
-_swrast_CopyConvolutionFilter1D(GLcontext *ctx, GLenum target, 
-                               GLenum internalFormat, 
-                               GLint x, GLint y, GLsizei width);
-extern void
-_swrast_CopyColorSubTable( GLcontext *ctx,GLenum target, GLsizei start,
-                          GLint x, GLint y, GLsizei width);
-extern void
-_swrast_CopyColorTable( GLcontext *ctx, 
-                       GLenum target, GLenum internalformat,
-                       GLint x, GLint y, GLsizei width);
-
 
-/*
- * Texture fallbacks.  Could also live in a new module
- * with the rest of the texture store fallbacks?
- */
 extern void
-_swrast_copy_teximage1d(GLcontext *ctx, GLenum target, GLint level,
-                        GLenum internalFormat,
-                        GLint x, GLint y, GLsizei width, GLint border);
+_swrast_eject_texture_images(struct gl_context *ctx);
 
-extern void
-_swrast_copy_teximage2d(GLcontext *ctx, GLenum target, GLint level,
-                        GLenum internalFormat,
-                        GLint x, GLint y, GLsizei width, GLsizei height,
-                        GLint border);
-
-
-extern void
-_swrast_copy_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
-                           GLint xoffset, GLint x, GLint y, GLsizei width);
-
-extern void
-_swrast_copy_texsubimage2d(GLcontext *ctx,
-                           GLenum target, GLint level,
-                           GLint xoffset, GLint yoffset,
-                           GLint x, GLint y, GLsizei width, GLsizei height);
-
-extern void
-_swrast_copy_texsubimage3d(GLcontext *ctx,
-                           GLenum target, GLint level,
-                           GLint xoffset, GLint yoffset, GLint zoffset,
-                           GLint x, GLint y, GLsizei width, GLsizei height);
-
-
-extern void
-_swrast_eject_texture_images(GLcontext *ctx);
-
-
-#if FEATURE_MESA_program_debug
-extern void
-_swrast_get_program_register(GLcontext *, enum register_file file,
-                             GLuint index, GLfloat val[4]);
-#endif /* FEATURE_MESA_program_debug */
 
 
 /**
@@ -276,8 +223,8 @@ struct swrast_device_driver {
     * these functions.  Locking in that case must be organized by the
     * driver by other mechanisms.
     */
-   void (*SpanRenderStart)(GLcontext *ctx);
-   void (*SpanRenderFinish)(GLcontext *ctx);
+   void (*SpanRenderStart)(struct gl_context *ctx);
+   void (*SpanRenderFinish)(struct gl_context *ctx);
 };