コード例 #1
0
ファイル: intel_tris.c プロジェクト: DavidGriffith/finx
static void intel_wpos_point( intelContextPtr intel,
			      intelVertexPtr v0 )
{
   GLuint offset = intel->wpos_offset;
   GLuint size = intel->wpos_size;

   __memcpy( ((char *)v0) + offset, v0, size );

   intel_draw_point( intel, v0 );
}
コード例 #2
0
ファイル: intel_tris.c プロジェクト: Starlink/mesa
static void intel_wpos_point( intelContextPtr intel,
			      intelVertexPtr v0 )
{
   GLuint offset = intel->wpos_offset;
   GLuint size = intel->wpos_size;
   GLfloat *v0_wpos = (GLfloat *)((char *)v0 + offset);

   __memcpy(v0_wpos, v0, size);
   v0_wpos[1] = -v0_wpos[1] + intel->driDrawable->h;

   intel_draw_point( intel, v0 );
}
コード例 #3
0
ファイル: intel_tris.c プロジェクト: beligit/psx4m
/* Currently not working - VERT_ATTRIB_POINTSIZE isn't correctly
 * represented in the fragment program InputsRead field.
 */
static void
intel_atten_point(struct intel_context *intel, intelVertexPtr v0)
{
   GLcontext *ctx = &intel->ctx;
   GLfloat psz[4], col[4], restore_psz, restore_alpha;

   _tnl_get_attr(ctx, v0, _TNL_ATTRIB_POINTSIZE, psz);
   _tnl_get_attr(ctx, v0, _TNL_ATTRIB_COLOR0, col);

   restore_psz = psz[0];
   restore_alpha = col[3];

   if (psz[0] >= ctx->Point.Threshold) {
      psz[0] = MIN2(psz[0], ctx->Point.MaxSize);
   }
   else {
      GLfloat dsize = psz[0] / ctx->Point.Threshold;
      psz[0] = MAX2(ctx->Point.Threshold, ctx->Point.MinSize);
      col[3] *= dsize * dsize;
   }

   if (psz[0] < 1.0)
      psz[0] = 1.0;

   if (restore_psz != psz[0] || restore_alpha != col[3]) {
      _tnl_set_attr(ctx, v0, _TNL_ATTRIB_POINTSIZE, psz);
      _tnl_set_attr(ctx, v0, _TNL_ATTRIB_COLOR0, col);

      intel_draw_point(intel, v0);

      psz[0] = restore_psz;
      col[3] = restore_alpha;

      _tnl_set_attr(ctx, v0, _TNL_ATTRIB_POINTSIZE, psz);
      _tnl_set_attr(ctx, v0, _TNL_ATTRIB_COLOR0, col);
   }
   else
      intel_draw_point(intel, v0);
}