4e8627e695595b2e611bcd77076863742f8fe859
[mesa.git] / src / mesa / swrast / swrast.h
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 */
8 void
9 _swrast_alloc_buffers( GLcontext *ctx );
10
11
12 void
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
19 void
20 _swrast_CopyPixels( GLcontext *ctx,
21 GLint srcx, GLint srcy,
22 GLint destx, GLint desty,
23 GLsizei width, GLsizei height,
24 GLenum type );
25
26 void
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
34 void
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
41 void
42 _swrast_Clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
43 GLint x, GLint y, GLint width, GLint height );
44
45 void
46 _swrast_Accum( GLcontext *ctx, GLenum op,
47 GLfloat value, GLint xpos, GLint ypos,
48 GLint width, GLint height );
49
50 void
51 _swrast_set_line_function( GLcontext *ctx );
52
53 void
54 _swrast_set_point_function( GLcontext *ctx );
55
56 void
57 _swrast_set_triangle_function( GLcontext *ctx );
58
59 void
60 _swrast_set_quad_function( GLcontext *ctx );
61
62 void
63 _swrast_flush( GLcontext *ctx );
64
65 GLboolean
66 _swrast_create_context( GLcontext *ctx );
67
68 void
69 _swrast_destroy_context( GLcontext *ctx );
70
71
72 /* Replace:
73 */
74 void
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