Ejemplo n.º 1
0
Archivo: ffb_tris.c Proyecto: aosm/X11
void ffb_fallback_line(GLcontext *ctx, ffb_vertex *v0, ffb_vertex *v1)
{
	SWvertex v[2];

	ffb_translate_vertex(ctx, v0, &v[0]);
	ffb_translate_vertex(ctx, v1, &v[1]);

	_swrast_Line(ctx, &v[0], &v[1]);
}
Ejemplo n.º 2
0
void nouveau_fallback_line(struct nouveau_context *nmesa,
		nouveauVertex *v0,
		nouveauVertex *v1)
{
	GLcontext *ctx = nmesa->glCtx;
	SWvertex v[2];
	_swsetup_Translate(ctx, v0, &v[0]);
	_swsetup_Translate(ctx, v1, &v[1]);
	_swrast_Line(ctx, &v[0], &v[1]);
}
Ejemplo n.º 3
0
static void 
mga_fallback_line( mgaContextPtr mmesa,
		    mgaVertex *v0,
		    mgaVertex *v1 )
{
   GLcontext *ctx = mmesa->glCtx;
   SWvertex v[2];
   mga_translate_vertex( ctx, v0, &v[0] );
   mga_translate_vertex( ctx, v1, &v[1] );
   _swrast_Line( ctx, &v[0], &v[1] );
}
Ejemplo n.º 4
0
static void 
trident_fallback_line( tridentContextPtr tmesa,
		     const tridentVertex *v0,
		     const tridentVertex *v1 )
{
   GLcontext *ctx = tmesa->glCtx;
   SWvertex v[2];
   trident_translate_vertex( ctx, v0, &v[0] );
   trident_translate_vertex( ctx, v1, &v[1] );
   _swrast_Line( ctx, &v[0], &v[1] );
}
Ejemplo n.º 5
0
static void
tdfx_fallback_line( tdfxContextPtr fxMesa,
                    tdfxVertex *v0,
                    tdfxVertex *v1 )
{
    GLcontext *ctx = fxMesa->glCtx;
    SWvertex v[2];
    tdfx_translate_vertex( ctx, v0, &v[0] );
    tdfx_translate_vertex( ctx, v1, &v[1] );
    _swrast_Line( ctx, &v[0], &v[1] );
}
Ejemplo n.º 6
0
static void
r128_fallback_line( r128ContextPtr rmesa,
		    r128Vertex *v0,
		    r128Vertex *v1 )
{
   GLcontext *ctx = rmesa->glCtx;
   SWvertex v[2];
   _swsetup_Translate( ctx, v0, &v[0] );
   _swsetup_Translate( ctx, v1, &v[1] );
   _swrast_Line( ctx, &v[0], &v[1] );
}
Ejemplo n.º 7
0
static void
i810_fallback_line( i810ContextPtr imesa,
		    i810Vertex *v0,
		    i810Vertex *v1 )
{
   GLcontext *ctx = imesa->glCtx;
   SWvertex v[2];
   i810_translate_vertex( ctx, v0, &v[0] );
   i810_translate_vertex( ctx, v1, &v[1] );
   _swrast_Line( ctx, &v[0], &v[1] );
}
Ejemplo n.º 8
0
Archivo: sis_tris.c Proyecto: aosm/X11
static void
sis_fallback_line( sisContextPtr smesa,
		   sisVertex *v0,
		   sisVertex *v1 )
{
   GLcontext *ctx = smesa->glCtx;
   SWvertex v[2];
   sis_translate_vertex( ctx, v0, &v[0] );
   sis_translate_vertex( ctx, v1, &v[1] );
   _swrast_Line( ctx, &v[0], &v[1] );
}
Ejemplo n.º 9
0
static void
via_fallback_line(struct via_context *vmesa,
                  viaVertex *v0,
                  viaVertex *v1)
{
    struct gl_context *ctx = vmesa->glCtx;
    SWvertex v[2];
    _swsetup_Translate(ctx, v0, &v[0]);
    _swsetup_Translate(ctx, v1, &v[1]);
    viaSpanRenderStart( ctx );
    _swrast_Line(ctx, &v[0], &v[1]);
    viaSpanRenderFinish( ctx );
}
Ejemplo n.º 10
0
static void
sis_fallback_line( sisContextPtr smesa,
		   sisVertex *v0,
		   sisVertex *v1 )
{
   struct gl_context *ctx = smesa->glCtx;
   SWvertex v[2];
   _swsetup_Translate( ctx, v0, &v[0] );
   _swsetup_Translate( ctx, v1, &v[1] );
   sisSpanRenderStart( ctx );
   _swrast_Line( ctx, &v[0], &v[1] );
   sisSpanRenderFinish( ctx );
   _swrast_flush( ctx );
}
Ejemplo n.º 11
0
static void
intel_fallback_line( intelContextPtr intel,
		    intelVertex *v0,
		    intelVertex *v1 )
{
   GLcontext *ctx = &intel->ctx;
   SWvertex v[2];

   if (0)
      fprintf(stderr, "\n%s\n", __FUNCTION__);

   _swsetup_Translate( ctx, v0, &v[0] );
   _swsetup_Translate( ctx, v1, &v[1] );
   intelSpanRenderStart( ctx );
   _swrast_Line( ctx, &v[0], &v[1] );
   intelSpanRenderFinish( ctx );
}
Ejemplo n.º 12
0
Archivo: i830_tris.c Proyecto: aosm/X11
static void
i830_fallback_line( i830ContextPtr imesa,
		    i830Vertex *v0,
		    i830Vertex *v1 )
{
   GLcontext *ctx = imesa->glCtx;
   SWvertex v[2];

   if (0)
      fprintf(stderr, "\n%s\n", __FUNCTION__);

   i830_translate_vertex( ctx, v0, &v[0] );
   i830_translate_vertex( ctx, v1, &v[1] );
   i830SpanRenderStart( ctx );
   _swrast_Line( ctx, &v[0], &v[1] );
   i830SpanRenderFinish( ctx );
}
Ejemplo n.º 13
0
static void _swsetup_render_line_tri( GLcontext *ctx,
				      GLuint e0, GLuint e1, GLuint e2 )
{
   SScontext *swsetup = SWSETUP_CONTEXT(ctx);
   struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
   GLubyte *ef = VB->EdgeFlag;
   SWvertex *verts = swsetup->verts;
   SWvertex *v0 = &verts[e0];
   SWvertex *v1 = &verts[e1];
   SWvertex *v2 = &verts[e2];
   GLchan c[2][4];
   GLchan s[2][4];
   GLuint i[2];

   if (ctx->_TriangleCaps & DD_FLATSHADE) {
      COPY_CHAN4(c[0], v0->color);
      COPY_CHAN4(c[1], v1->color);
      COPY_CHAN4(s[0], v0->specular);
      COPY_CHAN4(s[1], v1->specular);
      i[0] = v0->index;
      i[1] = v1->index;

      COPY_CHAN4(v0->color, v2->color);
      COPY_CHAN4(v1->color, v2->color);
      COPY_CHAN4(v0->specular, v2->specular);
      COPY_CHAN4(v1->specular, v2->specular);
      v0->index = v2->index;
      v1->index = v2->index;
   }

   if (swsetup->render_prim == GL_POLYGON) {
      if (ef[e2]) _swrast_Line( ctx, v2, v0 );
      if (ef[e0]) _swrast_Line( ctx, v0, v1 );
      if (ef[e1]) _swrast_Line( ctx, v1, v2 );
   } else {
      if (ef[e0]) _swrast_Line( ctx, v0, v1 );
      if (ef[e1]) _swrast_Line( ctx, v1, v2 );
      if (ef[e2]) _swrast_Line( ctx, v2, v0 );
   }

   if (ctx->_TriangleCaps & DD_FLATSHADE) {
      COPY_CHAN4(v0->color, c[0]);
      COPY_CHAN4(v1->color, c[1]);
      COPY_CHAN4(v0->specular, s[0]);
      COPY_CHAN4(v1->specular, s[1]);
      v0->index = i[0];
      v1->index = i[1];
   }
}
Ejemplo n.º 14
0
/*
 * Render a triangle using lines and respecting edge flags.
 */
static void
_swsetup_edge_render_line_tri(struct gl_context *ctx,
                              const GLubyte *ef,
                              GLuint e0,
                              GLuint e1,
                              GLuint e2,
                              const SWvertex *v0,
                              const SWvertex *v1,
                              const SWvertex *v2)
{
   SScontext *swsetup = SWSETUP_CONTEXT(ctx);

   if (swsetup->render_prim == GL_POLYGON) {
      if (ef[e2]) _swrast_Line( ctx, v2, v0 );
      if (ef[e0]) _swrast_Line( ctx, v0, v1 );
      if (ef[e1]) _swrast_Line( ctx, v1, v2 );
   } else {
      if (ef[e0]) _swrast_Line( ctx, v0, v1 );
      if (ef[e1]) _swrast_Line( ctx, v1, v2 );
      if (ef[e2]) _swrast_Line( ctx, v2, v0 );
   }
}
Ejemplo n.º 15
0
static void swsetup_line( struct gl_context *ctx, GLuint v0, GLuint v1 )
{
   SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
   _swrast_Line( ctx, &verts[v0], &verts[v1] );
}