Ejemplo n.º 1
0
static void 
vbuf_flush( struct draw_stage *stage, unsigned flags )
{
   struct vbuf_stage *vbuf = vbuf_stage( stage );

   vbuf_flush_vertices( vbuf );
}
Ejemplo n.º 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] );
}
Ejemplo n.º 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;
}
Ejemplo n.º 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 );
}
Ejemplo n.º 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 );
}
Ejemplo n.º 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 );
}
Ejemplo n.º 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] );
   }   
}
Ejemplo n.º 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 );
}