00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00033
00034
00035
00036
00037 #ifndef DRAW_CONTEXT_H
00038 #define DRAW_CONTEXT_H
00039
00040
00041 #include "pipe/p_state.h"
00042
00043
00044 struct pipe_context;
00045 struct draw_context;
00046 struct draw_stage;
00047 struct draw_vertex_shader;
00048
00049
00050
00051 struct draw_context *draw_create( void );
00052
00053 void draw_destroy( struct draw_context *draw );
00054
00055 void draw_set_viewport_state( struct draw_context *draw,
00056 const struct pipe_viewport_state *viewport );
00057
00058 void draw_set_clip_state( struct draw_context *pipe,
00059 const struct pipe_clip_state *clip );
00060
00061 void draw_set_rasterizer_state( struct draw_context *draw,
00062 const struct pipe_rasterizer_state *raster );
00063
00064 void draw_set_rasterize_stage( struct draw_context *draw,
00065 struct draw_stage *stage );
00066
00067 void draw_wide_point_threshold(struct draw_context *draw, float threshold);
00068
00069 void draw_wide_line_threshold(struct draw_context *draw, float threshold);
00070
00071 void draw_enable_line_stipple(struct draw_context *draw, boolean enable);
00072
00073 void draw_enable_point_sprites(struct draw_context *draw, boolean enable);
00074
00075 void draw_set_mrd(struct draw_context *draw, double mrd);
00076
00077 boolean
00078 draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe);
00079
00080 boolean
00081 draw_install_aapoint_stage(struct draw_context *draw, struct pipe_context *pipe);
00082
00083 boolean
00084 draw_install_pstipple_stage(struct draw_context *draw, struct pipe_context *pipe);
00085
00086
00087 int
00088 draw_find_vs_output(const struct draw_context *draw,
00089 uint semantic_name, uint semantic_index);
00090
00091 uint
00092 draw_num_vs_outputs(const struct draw_context *draw);
00093
00094
00095
00096
00097
00098
00099
00100 struct draw_vertex_shader *
00101 draw_create_vertex_shader(struct draw_context *draw,
00102 const struct pipe_shader_state *shader);
00103 void draw_bind_vertex_shader(struct draw_context *draw,
00104 struct draw_vertex_shader *dvs);
00105 void draw_delete_vertex_shader(struct draw_context *draw,
00106 struct draw_vertex_shader *dvs);
00107
00108
00109
00110
00111
00112
00113
00114 void draw_set_vertex_buffers(struct draw_context *draw,
00115 unsigned count,
00116 const struct pipe_vertex_buffer *buffers);
00117
00118 void draw_set_vertex_elements(struct draw_context *draw,
00119 unsigned count,
00120 const struct pipe_vertex_element *elements);
00121
00122 void
00123 draw_set_mapped_element_buffer_range( struct draw_context *draw,
00124 unsigned eltSize,
00125 unsigned min_index,
00126 unsigned max_index,
00127 const void *elements );
00128
00129 void draw_set_mapped_element_buffer( struct draw_context *draw,
00130 unsigned eltSize,
00131 const void *elements );
00132
00133 void draw_set_mapped_vertex_buffer(struct draw_context *draw,
00134 unsigned attr, const void *buffer);
00135
00136 void draw_set_mapped_constant_buffer(struct draw_context *draw,
00137 const void *buffer,
00138 unsigned size );
00139
00140 void draw_set_edgeflags( struct draw_context *draw,
00141 const unsigned *edgeflag );
00142
00143
00144
00145
00146
00147
00148 void draw_arrays(struct draw_context *draw, unsigned prim,
00149 unsigned start, unsigned count);
00150
00151 void draw_flush(struct draw_context *draw);
00152
00153
00154
00155
00156
00157 struct vbuf_render;
00158 void draw_set_render( struct draw_context *draw,
00159 struct vbuf_render *render );
00160
00161 void draw_set_driver_clipping( struct draw_context *draw,
00162 boolean bypass_clipping );
00163
00164 void draw_set_force_passthrough( struct draw_context *draw,
00165 boolean enable );
00166
00167
00168
00169
00170 boolean draw_need_pipeline(const struct draw_context *draw,
00171 const struct pipe_rasterizer_state *rasterizer,
00172 unsigned prim );
00173
00174
00175
00176 #endif