fglLightModelf man page on IRIX

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



fglLightModel(3G)	       OpenGL Reference		     fglLightModel(3G)

NAME
     fglLightModelf, fglLightModeli, fglLightModelfv, fglLightModeliv - set
     the lighting model parameters

FORTRAN SPECIFICATION
     SUBROUTINE fglLightModelf( INTEGER*4 pname,
				REAL*4 param )
     SUBROUTINE fglLightModeli( INTEGER*4 pname,
				INTEGER*4 param )

PARAMETERS
     pname   Specifies a single-valued lighting model parameter.
	     GL_LIGHT_MODEL_LOCAL_VIEWER, GL_LIGHT_MODEL_COLOR_CONTROL, and
	     GL_LIGHT_MODEL_TWO_SIDE are accepted.

     param   Specifies the value that param will be set to.

FORTRAN SPECIFICATION
     SUBROUTINE fglLightModelfv( INTEGER*4 pname,
				 CHARACTER*8 params )
     SUBROUTINE fglLightModeliv( INTEGER*4 pname,
				 CHARACTER*8 params )

PARAMETERS
     pname
	  Specifies a lighting model parameter.	 GL_LIGHT_MODEL_AMBIENT,
	  GL_LIGHT_MODEL_COLOR_CONTROL, GL_LIGHT_MODEL_LOCAL_VIEWER, and
	  GL_LIGHT_MODEL_TWO_SIDE are accepted.

     params
	  Specifies a pointer to the value or values that params will be set
	  to.

DESCRIPTION
     fglLightModel sets the lighting model parameter.  pname names a parameter
     and params gives the new value.  There are three lighting model
     parameters:

     GL_LIGHT_MODEL_AMBIENT
	       params contains four integer or floating-point values that
	       specify the ambient RGBA intensity of the entire scene.
	       Integer values are mapped linearly such that the most positive
	       representable value maps to 1.0, and the most negative
	       representable value maps to -1.0.  Floating-point values are
	       mapped directly.	 Neither integer nor floating-point values are
	       clamped.	 The initial ambient scene intensity is (0.2, 0.2,
	       0.2, 1.0).

									Page 1

fglLightModel(3G)	       OpenGL Reference		     fglLightModel(3G)

     GL_LIGHT_MODEL_COLOR_CONTROL
	       params must be either GL_SEPARATE_SPECULAR_COLOR or
	       GL_SINGLE_COLOR.	 GL_SINGLE_COLOR specifies that a single color
	       is generated from the lighting computation for a vertex.
	       GL_SEPARATE_SPECULAR_COLOR specifies that the specular color
	       computation of lighting be stored separately from the remainder
	       of the lighting computation.  The specular color is summed into
	       the generated fragment's color after the application of texture
	       mapping (if enabled).  The initial value is GL_SINGLE_COLOR.

     GL_LIGHT_MODEL_LOCAL_VIEWER
	       params is a single integer or floating-point value that
	       specifies how specular reflection angles are computed.  If
	       params is 0 (or 0.0), specular reflection angles take the view
	       direction to be parallel to and in the direction of the -z
	       axis, regardless of the location of the vertex in eye
	       coordinates.  Otherwise, specular reflections are computed from
	       the origin of the eye coordinate system.	 The initial value is
	       0.

     GL_LIGHT_MODEL_TWO_SIDE
	       params is a single integer or floating-point value that
	       specifies whether one- or two-sided lighting calculations are
	       done for polygons.  It has no effect on the lighting
	       calculations for points, lines, or bitmaps.  If params is 0 (or
	       0.0), one-sided lighting is specified, and only the front
	       material parameters are used in the lighting equation.
	       Otherwise, two-sided lighting is specified.  In this case,
	       vertices of back-facing polygons are lighted using the back
	       material parameters, and have their normals reversed before the
	       lighting equation is evaluated.	Vertices of front-facing
	       polygons are always lighted using the front material
	       parameters, with no change to their normals. The initial value
	       is 0.

     In RGBA mode, the lighted color of a vertex is the sum of the material
     emission intensity, the product of the material ambient reflectance and
     the lighting model full-scene ambient intensity, and the contribution of
     each enabled light source.	 Each light source contributes the sum of
     three terms:  ambient, diffuse, and specular.  The ambient light source
     contribution is the product of the material ambient reflectance and the
     light's ambient intensity.	 The diffuse light source contribution is the
     product of the material diffuse reflectance, the light's diffuse
     intensity, and the dot product of the vertex's normal with the normalized
     vector from the vertex to the light source.  The specular light source
     contribution is the product of the material specular reflectance, the
     light's specular intensity, and the dot product of the normalized
     vertex-to-eye and vertex-to-light vectors, raised to the power of the
     shininess of the material.	 All three light source contributions are
     attenuated equally based on the distance from the vertex to the light
     source and on light source direction, spread exponent, and spread cutoff
     angle.  All dot products are replaced with 0 if they evaluate to a

									Page 2

fglLightModel(3G)	       OpenGL Reference		     fglLightModel(3G)

     negative value.

     The alpha component of the resulting lighted color is set to the alpha
     value of the material diffuse reflectance.

     In color index mode, the value of the lighted index of a vertex ranges
     from the ambient to the specular values passed to fglMaterial using
     GL_COLOR_INDEXES.	Diffuse and specular coefficients, computed with a
     (.30, .59, .11) weighting of the lights' colors, the shininess of the
     material, and the same reflection and attenuation equations as in the
     RGBA case, determine how much above ambient the resulting index is.

NOTES
     GL_LIGHT_MODEL_COLOR_CONTROL is available only if the GL version is 1.2
     or greater.

ERRORS
     GL_INVALID_ENUM is generated if pname is not an accepted value.

     GL_INVALID_ENUM is generated if pname is GL_LIGHT_MODEL_COLOR_CONTROL and
     params is not one of GL_SINGLE_COLOR or GL_SEPARATE_SPECULAR_COLOR.

     GL_INVALID_OPERATION is generated if fglLightModel is executed between
     the execution of fglBegin and the corresponding execution of fglEnd.

ASSOCIATED GETS
     fglGet with argument GL_LIGHT_MODEL_AMBIENT
     fglGet with argument GL_LIGHT_MODEL_COLOR_CONTROL
     fglGet with argument GL_LIGHT_MODEL_LOCAL_VIEWER
     fglGet with argument GL_LIGHT_MODEL_TWO_SIDE
     fglIsEnabled with argument GL_LIGHTING

MACHINE DEPENDENCIES
     On Octane2 VPro systems, fglLightModel with GL_SEPARATE_SPECULAR_COLOR is
     not compatible with fragment lighting.  If fragment lighting is enabled,
     it will override the separate specular color light model.

     On Octane2 VPro systems, use of the texture q coordinate to achieve
     projective texture effects will be processed on a per-vertex basis
     instead of a per-pixel basis, unless the texture matrix is set up to be
     projective.  (A projective texture matrix, specified as 16-element array
     M, is defined to be one in which any of the M[3], M[7], or M[11] array
     elements is non-zero.) In addition, if either two-sided lighting or
     fragment lighting or separate specular lighting is in effect, projective
     texture effects will always be processed on a per-vertex basis.

SEE ALSO
     fglLight, fglMaterial

									Page 3

[top]

List of man pages available for IRIX

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