*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/bgntmesh (3)              
Title
Content
Arch
Section
 

Contents


bgntmesh(3G)							  bgntmesh(3G)


NAME    [Toc]    [Back]

     bgntmesh, endtmesh	- delimit the vertices of a triangle mesh

C SPECIFICATION    [Toc]    [Back]

     void bgntmesh()

     void endtmesh()

PARAMETERS    [Toc]    [Back]

     none

DESCRIPTION    [Toc]    [Back]

     Vertices specified	between	bgntmesh and endtmesh are used to define a
     mesh of triangles.	 The graphics pipe maintains two vertex	registers.
     The first and second vertices are loaded into the registers, but no
     triangle is drawn until the system	executes the third vertex routine.
     Upon executing the	third vertex routine, the system draws a triangle
     through the vertices, then	replaces the older of the register vertices
     with the third vertex.

     For each new vertex routine, the system draws a triangle through the new
     vertex and	the stored vertices, then (by default) replaces	the older
     stored vertex with	the new	vertex.	 If you	want the system	to replace the
     more recent of the	stored vertices, call swaptmesh	prior to calling v.

     Between bgntmesh and endtmesh you can issue the following Graphics
     Library routines:	c, color, cpack, lmbind, lmcolor, lmdef, n, RGBcolor,
     swaptmesh,	t, and v.  Use lmdef and lmbind	only to	respecify materials
     and their properties.

     If	you want to use	backface, you should specify the vertices of the first
     triangle in counter-clockwise order.  All triangles in the	mesh have the
     same rotation as the first	triangle in a mesh so that backfacing works
     correctly.

     There is no limit to the number of	vertices that can be specified between
     bgntmesh and endtmesh.

     By	default	triangle vertices are forced to	the nearest pixel center prior
     to	scan conversion.  Triangle accuracy is improved	when this coercion is
     defeated with the subpixel	command.  Subpixel vertex positioning is
     especially	important when triangles are scan converted with antialiasing
     enabled (see polysmooth).

     After endtmesh, the current graphics position is undefined.

EXAMPLE    [Toc]    [Back]

     For example, the code sequence:







									Page 1






bgntmesh(3G)							  bgntmesh(3G)



	  bgntmesh();
	  v3f(v0);
	  v3f(v1);
	  v3f(v2);
	  v3f(v3);
	  endtmesh();


     draws two triangles, (v0,v1,v2) and (v3,v2,v1), while the code sequence:

	  bgntmesh();
	  v3f(v0);
	  v3f(v1);
	  swaptmesh();
	  v3f(v2);
	  v3f(v3);
	  endtmesh();


     draws two triangles, (v0,v1,v2) and (v0,v2,v3).  There is no limit	to the
     number of times that swaptmesh can	be called.

NOTE    [Toc]    [Back]

     On	Impact and Infinite Reality lmcolor cannot be called between bgntmesh
     and endtmesh

SEE ALSO    [Toc]    [Back]

      
      
     backface, c, concave, frontface, polymode,	polysmooth, scrsubdivide,
     defpattern, shademodel, subpixel, swaptmesh, v


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
swaptmesh IRIX toggles the triangle mesh register pointer
endpolygon IRIX delimit the vertices of a polygon
endline IRIX delimit the vertices of a line
bgnline IRIX delimit the vertices of a line
bgnpolygon IRIX delimit the vertices of a polygon
bgnclosedline IRIX delimit the vertices of a closed line
bgnqstrip IRIX delimit the vertices of a quadrilateral strip
endqstrip IRIX delimit the vertices of a quadrilateral strip
endclosedline IRIX delimit the vertices of a closed line
glBegin Tru64 delimit the vertices of a primitive or a group of like primglBeginitives
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service