3e0c61eda201da77c18f0314e5b737e9a8134cde
1 /**************************************************************************
3 * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 **************************************************************************/
28 #ifndef PIPE_CONTEXT_H
29 #define PIPE_CONTEXT_H
35 extern struct pipe_context
*softpipe_create( void );
37 /* Drawing currently kludged up via the existing tnl/ module.
43 * Software pipeline rendering context. Basically a collection of
44 * state setting functions, plus VBO drawing entrypoint.
48 void (*destroy
)( struct pipe_context
* );
53 void (*draw_vb
)( struct pipe_context
*pipe
,
54 struct vertex_buffer
*VB
);
59 void (*set_alpha_test_state
)( struct pipe_context
*,
60 const struct pipe_alpha_test_state
* );
62 void (*set_blend_state
)( struct pipe_context
*,
63 const struct pipe_blend_state
* );
65 void (*set_cbuf_state
)( struct pipe_context
*,
66 const struct pipe_surface
* );
68 void (*set_clip_state
)( struct pipe_context
*,
69 const struct pipe_clip_state
* );
71 void (*set_depth_state
)( struct pipe_context
*,
72 const struct pipe_depth_state
* );
74 void (*set_point_state
)( struct pipe_context
*,
75 const struct pipe_point_state
* );
77 void (*set_framebuffer_state
)( struct pipe_context
*,
78 const struct pipe_framebuffer_state
* );
80 void (*set_fs_state
)( struct pipe_context
*,
81 const struct pipe_fs_state
* );
83 void (*set_polygon_stipple
)( struct pipe_context
*,
84 const struct pipe_poly_stipple
* );
86 void (*set_setup_state
)( struct pipe_context
*,
87 const struct pipe_setup_state
* );
89 void (*set_scissor_rect
)( struct pipe_context
*,
90 const struct pipe_scissor_rect
* );
92 void (*set_stencil_state
)( struct pipe_context
*,
93 const struct pipe_stencil_state
* );
95 void (*set_viewport
)( struct pipe_context
*,
96 const struct pipe_viewport
* );