15bd8deadSopenharmony_ciXXX - incomplete
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ciPRELIMINARY - NOT COMPLETE
45bd8deadSopenharmony_ci--------------------------
55bd8deadSopenharmony_ci
65bd8deadSopenharmony_ciName
75bd8deadSopenharmony_ci
85bd8deadSopenharmony_ci    HP_texture_lighting
95bd8deadSopenharmony_ci
105bd8deadSopenharmony_ciName Strings
115bd8deadSopenharmony_ci
125bd8deadSopenharmony_ci    GL_HP_texture_lighting
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_ciVersion
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    1.0
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciNumber
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    111
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciDependencies
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    OpenGL 1.1
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ciOverview
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ci    This extension defines a mechanism for applications to request
295bd8deadSopenharmony_ci    that color originating from specular lighting be added to
305bd8deadSopenharmony_ci    the fragment color _after_ texture application.
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciNew Procedures And Functions
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    None
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ciNew Tokens
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    Accepted by the <pname> parameter of TexEnvf, TexEnvfv, TexEnvi,
395bd8deadSopenharmony_ci    TexEnviv:
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci	TEXTURE_LIGHTING_MODE_HP
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ci    Accepted by the <param> parameter of TexEnvf, TexEnvfv, TexEnvi,
445bd8deadSopenharmony_ci    TexEnviv when <pname> is TEXTURE_APP_MODE_HP:
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci	TEXTURE_POST_SPECULAR_HP
475bd8deadSopenharmony_ci	TEXTURE_PRE_SPECULAR_HP
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL Specification (OpenGL Operation)
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    Lighting Operation
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci	If the texture application mode is TEXTURE_POST_SPECULAR_HP, the
545bd8deadSopenharmony_ci	color c produced by lighting a vertex is given by:
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci	    c	= e
575bd8deadSopenharmony_ci		   cm
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci		+ a   *  a
605bd8deadSopenharmony_ci		   cm     cs
615bd8deadSopenharmony_ci
625bd8deadSopenharmony_ci		  n-1
635bd8deadSopenharmony_ci		+ SUM (att )(spot )[a   * a
645bd8deadSopenharmony_ci		  i=0     i      i   cm    cli
655bd8deadSopenharmony_ci
665bd8deadSopenharmony_ci				+   (n @ VP   )d   * d
675bd8deadSopenharmony_ci					   pli  cm    cli
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci						srm
705bd8deadSopenharmony_ci				+   (f )(n @ h )    s   * s]
715bd8deadSopenharmony_ci				      i       i      cm    cli
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ci	If the texture application mode is TEXTURE_PRE_SPECULAR_HP, and
745bd8deadSopenharmony_ci	if texturing is enabled, two lighting components are computed
755bd8deadSopenharmony_ci	separately per vertex.
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci	Emissive, ambient, and diffuse color, c   :
785bd8deadSopenharmony_ci					       ead
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci	    c	= e
815bd8deadSopenharmony_ci	     ead   cm
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci		+ a   *  a
845bd8deadSopenharmony_ci		   cm     cs
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci		  n-1
875bd8deadSopenharmony_ci		+ SUM (att )(spot )[a   * a
885bd8deadSopenharmony_ci		  i=0     i      i   cm    cli
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci				+   (n @ VP   )d   * d]
915bd8deadSopenharmony_ci					   pli  cm    cli
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci	Specular color, c :
945bd8deadSopenharmony_ci			 s
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci		  n-1                          srm
975bd8deadSopenharmony_ci	    c	= SUM (att )(spot )(f )(n @ h )    s   * s
985bd8deadSopenharmony_ci	     s	  i=0     i      i   i       i      cm    cli
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci	These terms are then added after texture application, and the
1015bd8deadSopenharmony_ci	final (clamped) color used as the fragment color.
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ciAdditions to Chapter 3 of the GL Specification (Rasterization)
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci			Point
1075bd8deadSopenharmony_ci	       +--> Rasterization -->+
1085bd8deadSopenharmony_ci               |		     |
1095bd8deadSopenharmony_ci      From     |	Line	     |
1105bd8deadSopenharmony_ci    Primitive -+--> Rasterization -->+
1115bd8deadSopenharmony_ci    Assembly   |                     |
1125bd8deadSopenharmony_ci	       |      Polygon        |
1135bd8deadSopenharmony_ci	       +--> Rasterization -->+---> Texturing ---> Specular ---> Fog 
1145bd8deadSopenharmony_ci				     |
1155bd8deadSopenharmony_ci		        Pixel	     |
1165bd8deadSopenharmony_ci    DrawPixels --->   Rectangle ---->+
1175bd8deadSopenharmony_ci		    Rasterization    |
1185bd8deadSopenharmony_ci				     |
1195bd8deadSopenharmony_ci			Bitmap	     |
1205bd8deadSopenharmony_ci      Bitmap -----> Rasterization -->+
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    Figure 3.1, rasterization
1235bd8deadSopenharmony_ci
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ci    3.8.5 Texture Environments and Texture Functions
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci	If the texture application mode is TEXTURE_PRE_SPECULAR_HP,
1285bd8deadSopenharmony_ci	R , G , and B  refer to c   , the emissive, ambient, and diffuse color.
1295bd8deadSopenharmony_ci	 f   f       f           ead
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci    3.8a Specular
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci	If the texture application mode is TEXTURE_PRE_SPECULAR_HP and
1345bd8deadSopenharmony_ci	texturing is enabled, then the separate specular lighting
1355bd8deadSopenharmony_ci	coefficient interpolated for this fragment is added in at this
1365bd8deadSopenharmony_ci	stage.  The result is clamped before sending the fragment color
1375bd8deadSopenharmony_ci	to subsequent stages.  If the texture application mode is
1385bd8deadSopenharmony_ci	TEXTURE_POST_SPECULAR_HP, this stage is not enabled.
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ciAdditions to Chapter 4 of the GL Specification (Per-Fragment Operations
1415bd8deadSopenharmony_ciand the Framebuffer)
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ci    None
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ciAdditions to Chapter 5 of the GL Specification (Special Functions)
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci    None
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ciAdditions to Chapter 6 of the GL Specification (State and State Requests)
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ci    Get value		     Type Initial value		    Description		      Sec	 Attribute
1525bd8deadSopenharmony_ci    TEXTURE_LIGHTING_MODE_HP  Z4  TEXTURE_POST_SPECULAR_HP  Texture application mode  3.8a	 texture
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ciAdditions to the GLX Specification
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci    None
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ciGLX Protocol
1595bd8deadSopenharmony_ci
1605bd8deadSopenharmony_ci    TBD - ?
1615bd8deadSopenharmony_ci
1625bd8deadSopenharmony_ciErrors
1635bd8deadSopenharmony_ci
1645bd8deadSopenharmony_ci    INVALID_ENUM is generated if the <pname> parameter of TexEnvi,
1655bd8deadSopenharmony_ci      TexEnviv, TexEnvf, or TexEnvf is TEXTURE_LIGHTING_MODE_HP and 
1665bd8deadSopenharmony_ci      the <param> parameter is not one of TEXTURE_POST_SPECULAR_HP or
1675bd8deadSopenharmony_ci      TEXTURE_PRE_SPECULAR_HP.
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ciNew State
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci    None
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ciNew Implementation Dependent State
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ci    None
1765bd8deadSopenharmony_ci
177