swrast.h revision e3a051e0538a605551f4d58294c94f5eb00ed07f
1#ifndef SWRAST_H
2#define SWRAST_H
3
4#include "types.h"
5
6/* These are the functions exported from swrast.  (more to come)
7 */
8void
9_swrast_alloc_buffers( GLcontext *ctx );
10
11
12void
13_swrast_Bitmap( GLcontext *ctx,
14		GLint px, GLint py,
15		GLsizei width, GLsizei height,
16		const struct gl_pixelstore_attrib *unpack,
17		const GLubyte *bitmap );
18
19void
20_swrast_CopyPixels( GLcontext *ctx,
21		    GLint srcx, GLint srcy,
22		    GLint destx, GLint desty,
23		    GLsizei width, GLsizei height,
24		    GLenum type );
25
26void
27_swrast_DrawPixels( GLcontext *ctx,
28		    GLint x, GLint y,
29		    GLsizei width, GLsizei height,
30		    GLenum format, GLenum type,
31		    const struct gl_pixelstore_attrib *unpack,
32		    const GLvoid *pixels );
33
34void
35_swrast_ReadPixels( GLcontext *ctx,
36		    GLint x, GLint y, GLsizei width, GLsizei height,
37		    GLenum format, GLenum type,
38		    const struct gl_pixelstore_attrib *unpack,
39		    GLvoid *pixels );
40
41void
42_swrast_Clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
43	       GLint x, GLint y, GLint width, GLint height );
44
45void
46_swrast_Accum( GLcontext *ctx, GLenum op,
47	       GLfloat value, GLint xpos, GLint ypos,
48	       GLint width, GLint height );
49
50void
51_swrast_set_line_function( GLcontext *ctx );
52
53void
54_swrast_set_point_function( GLcontext *ctx );
55
56void
57_swrast_set_triangle_function( GLcontext *ctx );
58
59void
60_swrast_set_quad_function( GLcontext *ctx );
61
62void
63_swrast_flush( GLcontext *ctx );
64
65GLboolean
66_swrast_create_context( GLcontext *ctx );
67
68void
69_swrast_destroy_context( GLcontext *ctx );
70
71
72/* Replace:
73 */
74void
75_swrast_set_texture_sampler( struct gl_texture_object *t );
76
77
78
79#define _SWRAST_NEW_TRIANGLE (_NEW_RENDERMODE|		\
80                              _NEW_POLYGON|		\
81                              _NEW_DEPTH|		\
82                              _NEW_STENCIL|		\
83                              _NEW_COLOR|		\
84                              _NEW_TEXTURE|		\
85                              _NEW_HINT|		\
86                              _SWRAST_NEW_RASTERMASK|	\
87                              _NEW_LIGHT|		\
88                              _NEW_FOG)
89
90#define _SWRAST_NEW_LINE (_NEW_RENDERMODE|	\
91                          _NEW_LINE|		\
92                          _NEW_TEXTURE|		\
93                          _NEW_LIGHT|		\
94                          _NEW_FOG|		\
95                          _NEW_DEPTH)
96
97#define _SWRAST_NEW_POINT (_NEW_RENDERMODE |	\
98			   _NEW_POINT |		\
99			   _NEW_TEXTURE |	\
100			   _NEW_LIGHT |		\
101			   _NEW_FOG)
102
103
104
105
106
107
108#endif
109