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

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

Contents


shademodel(3G)							shademodel(3G)


NAME    [Toc]    [Back]

     shademodel	- selects the shading model

C SPECIFICATION    [Toc]    [Back]

     void shademodel(model)
     long model;

PARAMETERS    [Toc]    [Back]

     model   expects one of two	possible flags:

	     FLAT, tells the system to assign the same color to	each pixel of
	     lines and polygons	during scan conversion.

	     GOURAUD, tells the	system to interpolate color from vertex	to
	     vertex when scan converting lines,	and to interpolate color
	     throughout	the area of filled polygons when they are scan
	     converted.	 This is the default shading model.

DESCRIPTION    [Toc]    [Back]

     shademodel	determines the shading model that the system uses to render
     lines and filled polygons.	 When the system uses Gouraud shading, the
     colors along a line segment are an	interpolation of the colors at its
     vertices, and the colors in the interior of a filled polygon are an
     interpolation of the colors at its	vertices.  In RGB mode,	red, green,
     blue, and alpha (when supported) are all interpolated.  Currently the
     interpolation is linear.  Future architectures may	do nonlinear
     interpolation to compensate for errors due	to extreme projection.

     When flat shading is specified, color is not interpolated.	 Rather, the
     color of the second vertex	of a line segment, or of the last vertex of a
     polygon, is used at each pixel of the line	segment	or polygon.  Thus
     connected lines, triangles, and quadrilaterals can	be successfully	flat
     shaded.  For example, the color of	the nth	segment	in a connected line is
     determined	by the color of	vertex n+1, and	the color of the nth triangle
     in	a mesh is determined by	the color of vertex n+2.

     Color interpolation or flat shading occurs	after lighting and depthcueing
     calculations are made, so both these color	generation operations can be
     either flat or Gouraud shaded.  Texture, fog, and blending	calculations,
     however, occur after pixel	shading	is completed.  These operations	are
     always themselves Gouraud shaded, regardless of the current shade model.
     This means, for example, that a triangle mesh can be lighted or depthcued
     with flat shaded facets, then fogged or texture mapped smoothly.

SEE ALSO    [Toc]    [Back]

      
      
     getsm

NOTE    [Toc]    [Back]

     Gouraud is	the default shading model, but is in general slower than flat
     shading. To improve performance, specify flat shading where Gouraud
     shading is	not required.




									Page 1






shademodel(3G)							shademodel(3G)


BUGS    [Toc]    [Back]

     On	IRIS-4D	B and G	models,	and on the Personal Iris without Turbo
     Graphics, lines are always	drawn with constant color regardless of	the
     current shading model.  Also, flat	shaded independent polygons scan
     convert to	a single color,	but this color is not always that of the last
     vertex specified, Flat shaded polygons yield consistent results on	these
     models only when the same color is	specified at each vertex.  On Infinite
     Reality and Impact	flat shaded independent	polygons are shaded the	color
     of	the first vertex.

     On	IRIS-4D	GT and GTX models, lines drawn with move and draw are always
     flat shaded, and lines drawn with v commands are always Gouraud shaded,
     regardless	of the current shading model.  Independent polygons are	always
     Gouraud shaded.  Triangle meshes are correctly flat or Gouraud shaded,
     depending on the shading model.

     On	early versions of IRIS-4D GT and GTX models, alpha is not interpolated
     correctly within polygons.

     On	IRIS-4D	VGX models, independent	quads will flat-shade with the color
     from the third vertex instead of the fourth.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
getsm IRIX returns the current shading model
lmbind IRIX selects a new material, light source, or lighting model
glShadeModel Tru64 select flat or smooth shading
glshademodel IRIX select flat or smooth shading
DXmSvnSelectEntry Tru64 Selects a specified entry.
DXmSvnSelectAll Tru64 Selects all entries.
tevbind IRIX selects a texture environment
drawmode IRIX selects which GL framebuffer is drawable
scrnselect IRIX selects the screen upon which new windows are placed
tlutbind IRIX selects a texture look up table
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service