⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fglpixeltransfer.html

📁 计算机图形学~想必是很多人需要的~在此共享一下
💻 HTML
字号:
<HTML><BODY><PRE>     <STRONG>NAME</STRONG>	  <STRONG>fglPixelTransferf,</STRONG> <STRONG>fglPixelTransferi</STRONG> - set pixel transfer	  modes     <STRONG>FORTRAN</STRONG> <STRONG>SPECIFICATION</STRONG>	  SUBROUTINE <STRONG>fglPixelTransferf</STRONG>(	INTEGER*4 <EM>pname</EM>,					REAL*4 <EM>param</EM> )	  SUBROUTINE <STRONG>fglPixelTransferi</STRONG>(	INTEGER*4 <EM>pname</EM>,					INTEGER*4 <EM>param</EM>	)     <STRONG>PARAMETERS</STRONG>	  <EM>pname</EM>	 Specifies the symbolic	name of	the pixel transfer		 parameter to be set.  Must be one of the following:		 <STRONG>GL_MAP_COLOR</STRONG>, <STRONG>GL_MAP_STENCIL</STRONG>, <STRONG>GL_INDEX_SHIFT</STRONG>,		 <STRONG>GL_INDEX_OFFSET</STRONG>, <STRONG>GL_RED_SCALE</STRONG>,	<STRONG>GL_RED_BIAS</STRONG>,		 <STRONG>GL_GREEN_SCALE</STRONG>, <STRONG>GL_GREEN_BIAS</STRONG>,	<STRONG>GL_BLUE_SCALE</STRONG>,		 <STRONG>GL_BLUE_BIAS</STRONG>, <STRONG>GL_ALPHA_SCALE</STRONG>, <STRONG>GL_ALPHA_BIAS</STRONG>,		 <STRONG>GL_DEPTH_SCALE</STRONG>, or <STRONG>GL_DEPTH_BIAS</STRONG>.	  <EM>param</EM>	 Specifies the value that <EM>pname</EM>	is set to.     <STRONG>DESCRIPTION</STRONG>	  <STRONG>fglPixelTransfer</STRONG> sets	pixel transfer modes that affect the	  operation of subsequent <STRONG>fglCopyPixels</STRONG>, <STRONG>fglCopyTexImage1D</STRONG>,	  <STRONG>fglCopyTexImage2D</STRONG>, <STRONG>fglCopyTexSubImage1D</STRONG>,	  <STRONG>fglCopyTexSubImage2D</STRONG>,	<STRONG>fglDrawPixels</STRONG>, <STRONG>fglReadPixels</STRONG>,	  <STRONG>fglTexImage1D</STRONG>, <STRONG>fglTexImage2D</STRONG>,	<STRONG>fglTexSubImage1D</STRONG>, and	  <STRONG>fglTexSubImage2D</STRONG> commands.  The algorithms that are	  specified by pixel transfer modes operate on pixels after	  they are read	from the frame buffer (<STRONG>fglCopyPixels</STRONG>	  <STRONG>fglCopyTexImage1D</STRONG>, <STRONG>fglCopyTexImage2D</STRONG>,	<STRONG>fglCopyTexSubImage1D</STRONG>,	  <STRONG>fglCopyTexSubImage2D</STRONG>,	and <STRONG>fglReadPixels</STRONG>), or unpacked	from	  client memory	(<STRONG>fglDrawPixels</STRONG>,	<STRONG>fglTexImage1D</STRONG>, <STRONG>fglTexImage2D</STRONG>,	  <STRONG>fglTexSubImage1D</STRONG>, and	<STRONG>fglTexSubImage2D</STRONG>). Pixel transfer	  operations happen in the same	order, and in the same manner,	  regardless of	the command that resulted in the pixel	  operation.  Pixel storage modes (see <STRONG>fglPixelStore</STRONG>) control	  the unpacking	of pixels being	read from client memory, and	  the packing of pixels	being written back into	client memory.	  Pixel	transfer operations handle four	fundamental pixel	  types:  <EM>color</EM>, <EM>color</EM> <EM>index</EM>, <EM>depth</EM>, and <EM>stencil</EM>.  <EM>Color</EM>	  pixels consist of four floating-point	values with	  unspecified mantissa and exponent sizes, scaled such that 0	  represents zero intensity and	1 represents full intensity.	  <EM>Color</EM>	<EM>indices</EM>	comprise a single fixed-point value, with	  unspecified precision	to the right of	the binary point.	  <EM>Depth</EM>	pixels comprise	a single floating-point	value, with	  unspecified mantissa and exponent sizes, scaled such that	  0.0 represents the minimum depth buffer value, and 1.0	  represents the maximum depth buffer value.  Finally, <EM>stencil</EM>	  pixels comprise a single fixed-point value, with unspecified	  precision to the right of the	binary point.	  The pixel transfer operations	performed on the four basic	  pixel	types are as follows:	  Color	      Each of the four color components	is multiplied		      by a scale factor, then added to a bias factor.		      That is, the red component is multiplied by		      <STRONG>GL_RED_SCALE</STRONG>, then added to <STRONG>GL_RED_BIAS</STRONG>; the		      green component is multiplied by <STRONG>GL_GREEN_SCALE</STRONG>,		      then added to <STRONG>GL_GREEN_BIAS</STRONG>; the blue component		      is multiplied by <STRONG>GL_BLUE_SCALE</STRONG>, then added to		      <STRONG>GL_BLUE_BIAS</STRONG>; and	the alpha component is		      multiplied by <STRONG>GL_ALPHA_SCALE</STRONG>, then added to		      <STRONG>GL_ALPHA_BIAS</STRONG>.  After all	four color components		      are scaled and biased, each is clamped to	the		      range [0,1].  All	color, scale, and bias values		      are specified with <STRONG>fglPixelTransfer</STRONG>.		      If <STRONG>GL_MAP_COLOR</STRONG> is true, each color component is		      scaled by	the size of the	corresponding color-		      to-color map, then replaced by the contents of		      that map indexed by the scaled component.	 That		      is, the red component is scaled by		      <STRONG>GL_PIXEL_MAP_R_TO_R_SIZE</STRONG>,	then replaced by the		      contents of <STRONG>GL_PIXEL_MAP_R_TO_R</STRONG> indexed by		      itself.  The green component is scaled by		      <STRONG>GL_PIXEL_MAP_G_TO_G_SIZE</STRONG>,	then replaced by the		      contents of <STRONG>GL_PIXEL_MAP_G_TO_G</STRONG> indexed by		      itself.  The blue	component is scaled by		      <STRONG>GL_PIXEL_MAP_B_TO_B_SIZE</STRONG>,	then replaced by the		      contents of <STRONG>GL_PIXEL_MAP_B_TO_B</STRONG> indexed by		      itself.  And the alpha component is scaled by		      <STRONG>GL_PIXEL_MAP_A_TO_A_SIZE</STRONG>,	then replaced by the		      contents of <STRONG>GL_PIXEL_MAP_A_TO_A</STRONG> indexed by		      itself.  All components taken from the maps are		      then clamped to the range	[0,1].	<STRONG>GL_MAP_COLOR</STRONG>		      is specified with	<STRONG>fglPixelTransfer</STRONG>.  The		      contents of the various maps are specified with		      <STRONG>fglPixelMap</STRONG>.	  Color	index Each color index is shifted left by		      <STRONG>GL_INDEX_SHIFT</STRONG> bits; any bits beyond the number		      of fraction bits carried by the fixed-point		      index are	filled with zeros.  If <STRONG>GL_INDEX_SHIFT</STRONG>		      is negative, the shift is	to the right, again		      zero filled.  Then <STRONG>GL_INDEX_OFFSET</STRONG> is added to		      the index.  <STRONG>GL_INDEX_SHIFT</STRONG> and <STRONG>GL_INDEX_OFFSET</STRONG>		      are specified with		      <STRONG>fglPixelTransfer</STRONG>.		      From this	point, operation diverges depending on		      the required format of the resulting pixels.  If		      the resulting pixels are to be written to	a		      color index buffer, or if	they are being read		      back to client memory in <STRONG>GL_COLOR_INDEX</STRONG> format,		      the pixels continue to be	treated	as indices.		      If <STRONG>GL_MAP_COLOR</STRONG> is true, each index is masked by		      2n - 1, where n is <STRONG>GL_PIXEL_MAP_I_TO_I_SIZE</STRONG>,		      then replaced by the contents of		      <STRONG>GL_PIXEL_MAP_I_TO_I</STRONG> indexed by the masked	value.		      <STRONG>GL_MAP_COLOR</STRONG> is specified	with <STRONG>fglPixelTransfer</STRONG>.		      The contents of the index	map is specified with		      <STRONG>fglPixelMap</STRONG>.		      If the resulting pixels are to be	written	to an		      RGBA color buffer, or if they are	read back to		      client memory in a format	other than		      <STRONG>GL_COLOR_INDEX</STRONG>, the pixels are converted from		      indices to colors	by referencing the four	maps		      <STRONG>GL_PIXEL_MAP_I_TO_R</STRONG>, <STRONG>GL_PIXEL_MAP_I_TO_G</STRONG>,		      <STRONG>GL_PIXEL_MAP_I_TO_B</STRONG>, and <STRONG>GL_PIXEL_MAP_I_TO_A</STRONG>.		      Before being dereferenced, the index is masked		      by 2n - 1, where n is <STRONG>GL_PIXEL_MAP_I_TO_R_SIZE</STRONG>		      for the red map, <STRONG>GL_PIXEL_MAP_I_TO_G_SIZE</STRONG>	for		      the green	map, <STRONG>GL_PIXEL_MAP_I_TO_B_SIZE</STRONG> for the		      blue map,	and <STRONG>GL_PIXEL_MAP_I_TO_A_SIZE</STRONG> for the		      alpha map.  All components taken from the	maps		      are then clamped to the range [0,1].  The		      contents of the four maps	is specified with		      <STRONG>fglPixelMap</STRONG>.	  Depth	      Each depth value is multiplied by		      <STRONG>GL_DEPTH_SCALE</STRONG>, added to <STRONG>GL_DEPTH_BIAS</STRONG>, then		      clamped to the range [0,1].	  Stencil     Each index is shifted <STRONG>GL_INDEX_SHIFT</STRONG> bits	just		      as a color index is, then	added to		      <STRONG>GL_INDEX_OFFSET</STRONG>.	If <STRONG>GL_MAP_STENCIL</STRONG> is true,		      each index is masked by 2n - 1, where n is		      <STRONG>GL_PIXEL_MAP_S_TO_S_SIZE</STRONG>,	then replaced by the		      contents of <STRONG>GL_PIXEL_MAP_S_TO_S</STRONG> indexed by the		      masked value.	  The following	table gives the	type, initial value, and range	  of valid values for each of the pixel	transfer parameters	  that are set with <STRONG>fglPixelTransfer</STRONG>.	   _________________________________________________________	   |	 <EM>pname</EM>	    |  <EM>type</EM>   |	<EM>initial</EM>	<EM>value</EM> |	<EM>valid</EM> <EM>range</EM> |	   <EM>|</EM>________________<EM>|</EM>_________<EM>|</EM>_______________<EM>|</EM>_____________|	   | <STRONG>GL_MAP_COLOR</STRONG>   | boolean |	    false     |	true/false  |	   |<STRONG>GL_MAP_STENCIL</STRONG>  | boolean |	    false     |	true/false  |	   |<STRONG>GL_INDEX_SHIFT</STRONG>  | integer |	      0	      |	 (-oo,oo)   |	   |<STRONG>GL_INDEX_OFFSET</STRONG> | integer |	      0	      |	 (-oo,oo)   |	   | <STRONG>GL_RED_SCALE</STRONG>   |  float  |	      1	      |	 (-oo,oo)   |	   |<STRONG>GL_GREEN_SCALE</STRONG>  |  float  |	      1	      |	 (-oo,oo)   |	   | <STRONG>GL_BLUE_SCALE</STRONG>  |  float  |	      1	      |	 (-oo,oo)   |	   |<STRONG>GL_ALPHA_SCALE</STRONG>  |  float  |	      1	      |	 (-oo,oo)   |	   |<STRONG>GL_DEPTH_SCALE</STRONG>  |  float  |	      1	      |	 (-oo,oo)   |	   |  <STRONG>GL_RED_BIAS</STRONG>   |  float  |	      0	      |	 (-oo,oo)   |	   | <STRONG>GL_GREEN_BIAS</STRONG>  |  float  |	      0	      |	 (-oo,oo)   |	   | <STRONG>GL_BLUE_BIAS</STRONG>   |  float  |	      0	      |	 (-oo,oo)   |	   | <STRONG>GL_ALPHA_BIAS</STRONG>  |  float  |	      0	      |	 (-oo,oo)   |	   | <STRONG>GL_DEPTH_BIAS</STRONG>  |  float  |	      0	      |	 (-oo,oo)   |	   <EM>|</EM>________________<EM>|</EM>_________<EM>|</EM>_______________<EM>|</EM>_____________|	  <STRONG>fglPixelTransferf</STRONG> can	be used	to set any pixel transfer	  parameter.  If the parameter type is boolean,	0 implies	  false	and any	other value implies true.  If <EM>pname</EM> is an	  integer parameter, <EM>param</EM> is rounded to the nearest integer.	  Likewise, <STRONG>fglPixelTransferi</STRONG> can be used to set any of	the	  pixel	transfer parameters.  Boolean parameters are set to	  false	if <EM>param</EM> is 0 and to true otherwise.  <EM>param</EM> is	  converted to floating	point before being assigned to real-	  valued parameters.     <STRONG>NOTES</STRONG>	  If a <STRONG>fglCopyPixels</STRONG>, <STRONG>fglCopyTexImage1D</STRONG>, <STRONG>fglCopyTexImage2D</STRONG>,	  <STRONG>fglCopyTexSubImage1D</STRONG>,	<STRONG>fglCopyTexSubImage2D</STRONG>, <STRONG>fglDrawPixels</STRONG>,	  <STRONG>fglReadPixels</STRONG>, <STRONG>fglTexImage1D</STRONG>,	<STRONG>fglTexImage2D</STRONG>,	  <STRONG>fglTexSubImage1D</STRONG>, or <STRONG>fglTexSubImage2D</STRONG>	command	is placed in a	  display list (see <STRONG>fglNewList</STRONG> and <STRONG>fglCallList</STRONG>), the pixel	  transfer mode	settings in effect when	the display list is	  <EM>executed</EM> are the ones	that are used.	They may be different	  from the settings when the command was compiled into the	  display list.     <STRONG>ERRORS</STRONG>	  <STRONG>GL_INVALID_ENUM</STRONG> is generated if <EM>pname</EM>	is not an accepted	  value.	  <STRONG>GL_INVALID_OPERATION</STRONG> is generated if <STRONG>fglPixelTransfer</STRONG>	is	  executed between the execution of <STRONG>fglBegin</STRONG> and the	  corresponding	execution of <STRONG>fglEnd</STRONG>.     <STRONG>ASSOCIATED</STRONG>	<STRONG>GETS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_MAP_COLOR</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_MAP_STENCIL</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_INDEX_SHIFT</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_INDEX_OFFSET</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_RED_SCALE</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_RED_BIAS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_GREEN_SCALE</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_GREEN_BIAS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_BLUE_SCALE</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_BLUE_BIAS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_ALPHA_SCALE</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_ALPHA_BIAS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_DEPTH_SCALE</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_DEPTH_BIAS</STRONG>     <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG>	  <STRONG>fglCallList</STRONG>, <STRONG>fglCopyPixels</STRONG>, <STRONG>fglCopyTexImage1D</STRONG>,	  <STRONG>fglCopyTexImage2D</STRONG>, <STRONG>fglCopyTexSubImage1D</STRONG>,	  <STRONG>fglCopyTexSubImage2D</STRONG>,	<STRONG>fglDrawPixels</STRONG>, <STRONG>fglNewList</STRONG>,	  <STRONG>fglPixelMap</STRONG>, <STRONG>fglPixelStore</STRONG>, <STRONG>fglPixelZoom</STRONG>, <STRONG>fglReadPixels</STRONG>,	  <STRONG>fglTexImage1D</STRONG>, <STRONG>fglTexImage2D</STRONG>,	<STRONG>fglTexSubImage1D</STRONG>,	  <STRONG>fglTexSubImage2D</STRONG></PRE></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -