static void 
vbuf_flush( struct draw_stage *stage, unsigned flags )
{
   struct vbuf_stage *vbuf = vbuf_stage( stage );

   vbuf_flush_vertices( vbuf );
}
Example #2
0
static void 
vbuf_point( struct draw_stage *stage, 
            struct prim_header *prim )
{
   struct vbuf_stage *vbuf = vbuf_stage( stage );

   check_space( vbuf, 1 );

   vbuf->indices[vbuf->nr_indices++] = emit_vertex( vbuf, prim->v[0] );
}
Example #3
0
static void 
vbuf_flush( struct draw_stage *stage, unsigned flags )
{
   struct vbuf_stage *vbuf = vbuf_stage( stage );

   vbuf_flush_vertices( vbuf );

   stage->point = vbuf_first_point;
   stage->line = vbuf_first_line;
   stage->tri = vbuf_first_tri;
}
Example #4
0
static void 
vbuf_first_point( struct draw_stage *stage,
                  struct prim_header *prim )
{
   struct vbuf_stage *vbuf = vbuf_stage( stage );

   vbuf_flush_vertices(vbuf);
   vbuf_start_prim(vbuf, PIPE_PRIM_POINTS);
   stage->point = vbuf_point;
   stage->point( stage, prim );
}
Example #5
0
static void 
vbuf_first_line( struct draw_stage *stage,
                 struct prim_header *prim )
{
   struct vbuf_stage *vbuf = vbuf_stage( stage );

   vbuf_flush_vertices( vbuf );
   vbuf_start_prim(vbuf, PIPE_PRIM_LINES);
   stage->line = vbuf_line;
   stage->line( stage, prim );
}
Example #6
0
static void 
vbuf_first_tri( struct draw_stage *stage,
                struct prim_header *prim )
{
   struct vbuf_stage *vbuf = vbuf_stage( stage );

   vbuf_flush_vertices( vbuf );
   vbuf_start_prim(vbuf, PIPE_PRIM_TRIANGLES);
   stage->tri = vbuf_tri;
   stage->tri( stage, prim );
}
Example #7
0
static void 
vbuf_line( struct draw_stage *stage, 
           struct prim_header *prim )
{
   struct vbuf_stage *vbuf = vbuf_stage( stage );
   unsigned i;

   check_space( vbuf, 2 );

   for (i = 0; i < 2; i++) {
      vbuf->indices[vbuf->nr_indices++] = emit_vertex( vbuf, prim->v[i] );
   }   
}
Example #8
0
static void vbuf_destroy( struct draw_stage *stage )
{
   struct vbuf_stage *vbuf = vbuf_stage( stage );

   if(vbuf->indices)
      align_free( vbuf->indices );
   
   if (vbuf->render)
      vbuf->render->destroy( vbuf->render );

   if (vbuf->cache)
      translate_cache_destroy(vbuf->cache);

   FREE( stage );
}