al_draw_soft_triangle man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

al_draw_soft_triangle(3)			      al_draw_soft_triangle(3)

NAME
       al_draw_soft_triangle - Allegro 5 API

SYNOPSIS
	      #include <allegro5/allegro_primitives.h>

	      void al_draw_soft_triangle(
		 ALLEGRO_VERTEX* v1, ALLEGRO_VERTEX* v2, ALLEGRO_VERTEX* v3, uintptr_t state,
		 void (*init)(uintptr_t, ALLEGRO_VERTEX*, ALLEGRO_VERTEX*, ALLEGRO_VERTEX*),
		 void (*first)(uintptr_t, int, int, int, int),
		 void (*step)(uintptr_t, int),
		 void (*draw)(uintptr_t, int, int, int))

DESCRIPTION
       Draws  a triangle using the software rasterizer and user supplied pixel
       functions.  For help in understanding what these functions do, see  the
       implementation	of  the	 various  shading  routines  in	 addons/primi‐
       tives/tri_soft.c.  The triangle is drawn in two segments, from  top  to
       bottom.	The segments are deliniated by the vertically middle vertex of
       the triangle.  One of each segment may be absent if  two	 vertices  are
       horizontally collinear.

       Parameters:

       · v1, v2, v3 - The three vertices of the triangle

       · state	-  A  pointer  to  a user supplied struct, this struct will be
	 passed to all the pixel functions

       · init - Called once per call before any drawing is  done.   The	 three
	 points passed to it may be altered by clipping.

       · first	-  Called  twice  per  call, once per triangle segment.	 It is
	 passed 4 parameters, the first two are the coordinates of the initial
	 pixel	drawn  in  the segment.	 The second two are the left minor and
	 the left major steps, respectively.  They represent the sizes of  two
	 steps	taken  by  the	rasterizer as it walks on the left side of the
	 triangle.  From then on, the each step will either be classified as a
	 minor or a major step, corresponding to the above values.

       · step  -  Called once per scanline.  The last parameter is set to 1 if
	 the step is a minor step, and 0 if it is a major step.

       · draw - Called once per scanline.  The function is  expected  to  draw
	 the scanline starting with a point specified by the first two parame‐
	 ters (corresponding to x and y values) going to the  right  until  it
	 reaches  the  value  of  the  third parameter (the x value of the end
	 point).  All coordinates are inclusive.

SEE ALSO
       al_draw_triangle(3)

Allegro reference manual			      al_draw_soft_triangle(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net