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

📄 fglpixelstore.html

📁 计算机图形学~想必是很多人需要的~在此共享一下
💻 HTML
字号:
<HTML><BODY><PRE>     <STRONG>NAME</STRONG>	  <STRONG>fglPixelStoref,</STRONG> <STRONG>fglPixelStorei</STRONG> - set pixel storage modes     <STRONG>FORTRAN</STRONG> <STRONG>SPECIFICATION</STRONG>	  SUBROUTINE <STRONG>fglPixelStoref</STRONG>( INTEGER*4 <EM>pname</EM>,				     REAL*4 <EM>param</EM> )	  SUBROUTINE <STRONG>fglPixelStorei</STRONG>( INTEGER*4 <EM>pname</EM>,				     INTEGER*4 <EM>param</EM> )     <STRONG>PARAMETERS</STRONG>	  <EM>pname</EM>	 Specifies the symbolic	name of	the parameter to be		 set.  Six values affect the packing of	pixel data		 into memory:  <STRONG>GL_PACK_SWAP_BYTES</STRONG>, <STRONG>GL_PACK_LSB_FIRST</STRONG>,		 <STRONG>GL_PACK_ROW_LENGTH</STRONG>, <STRONG>GL_PACK_SKIP_PIXELS</STRONG>,		 <STRONG>GL_PACK_SKIP_ROWS</STRONG>, and	<STRONG>GL_PACK_ALIGNMENT</STRONG>.  Six	more		 affect	the unpacking of pixel data <EM>from</EM> memory:		 <STRONG>GL_UNPACK_SWAP_BYTES</STRONG>, <STRONG>GL_UNPACK_LSB_FIRST</STRONG>,		 <STRONG>GL_UNPACK_ROW_LENGTH</STRONG>, <STRONG>GL_UNPACK_SKIP_PIXELS</STRONG>,		 <STRONG>GL_UNPACK_SKIP_ROWS</STRONG>, and <STRONG>GL_UNPACK_ALIGNMENT</STRONG>.	  <EM>param</EM>	 Specifies the value that <EM>pname</EM>	is set to.     <STRONG>DESCRIPTION</STRONG>	  <STRONG>fglPixelStore</STRONG>	sets pixel storage modes that affect the	  operation of subsequent <STRONG>fglDrawPixels</STRONG>	and <STRONG>fglReadPixels</STRONG> as	  well as the unpacking	of polygon stipple patterns (see	  <STRONG>fglPolygonStipple</STRONG>), bitmaps (see <STRONG>fglBitmap</STRONG>), and texture	  patterns (see	<STRONG>fglTexImage1D</STRONG>, <STRONG>fglTexImage2D</STRONG>,	  <STRONG>fglTexSubImage1D</STRONG>, and	<STRONG>fglTexSubImage2D</STRONG>).	  <EM>pname</EM>	is a symbolic constant indicating the parameter	to be	  set, and <EM>param</EM> is the	new value.  Six	of the twelve storage	  parameters affect how	pixel data is returned to client	  memory, and are therefore significant	only for <STRONG>fglReadPixels</STRONG>	  commands.  They are as follows:	  <STRONG>GL_PACK_SWAP_BYTES</STRONG>		    If true, byte ordering for multibyte color		    components,	depth components, color	indices, or		    stencil indices is reversed.  That is, if a	four-		    byte component consists of bytes b , b , b , b ,		    it is stored in memory as b	, b , <STRONG>b</STRONG>	, <STRONG>b</STRONG>  i<STRONG>f</STRONG>	  3		    <STRONG>GL_PACK_SWAP_BYTES</STRONG> is true.3 <STRONG>GL_PACK_SWAP_BYTES</STRONG>		    has	no effect on the memory	order of components		    within a pixel, only on the	order of bytes within		    components or indices.  For	example, the three		    components of a <STRONG>GL_RGB</STRONG> format pixel	are always		    stored with	red first, green second, and blue		    third, regardless of the value of		    <STRONG>GL_PACK_SWAP_BYTES</STRONG>.	  <STRONG>GL_PACK_LSB_FIRST</STRONG>		    If true, bits are ordered within a byte from least		    significant	to most	significant; otherwise,	the		    first bit in each byte is the most significant		    one.  This parameter is significant	for bitmap		    data only.	  <STRONG>GL_PACK_ROW_LENGTH</STRONG>		    If greater than 0, <STRONG>GL_PACK_ROW_LENGTH</STRONG> defines the		    number of pixels in	a row.	If the first pixel of		    a row is placed at location	p in memory, then the		    location of	the first pixel	of the next row	is		    obtained by	skipping					 (					 |nl	  s<EM>&gt;</EM>a				     k = |<STRONG>_</STRONG>|<STRONG>___</STRONG>|  s&lt;a					 |s| a |					 (		    components or indices, where n is the number of		    components or indices in a pixel, l	is the number		    of pixels in a row (<STRONG>GL_PACK_ROW_LENGTH</STRONG> if it is		    greater than 0, the	width argument to the pixel		    routine otherwise),	a is the value of		    <STRONG>GL_PACK_ALIGNMENT</STRONG>, and s is	the size, in bytes, of		    a single component (if a&lt;s,	then it	is as if a=s).		    In the case	of 1-bit values, the location of the		    next row is	obtained by skipping					k = 8a|<STRONG>__</STRONG>|					      |8a|		    components or indices.		    The	word <EM>component</EM> in this description refers to		    the	nonindex values	red, green, blue, alpha, and		    depth.  Storage format <STRONG>GL_RGB</STRONG>, for example,	has		    three components per pixel:	 first red, then		    green, and finally blue.	  <STRONG>GL_PACK_SKIP_PIXELS</STRONG> and <STRONG>GL_PACK_SKIP_ROWS</STRONG>		    These values are provided as a convenience to the		    programmer;	they provide no	functionality that		    cannot be duplicated simply	by incrementing	the		    pointer passed to <STRONG>fglReadPixels</STRONG>.  Setting		    <STRONG>GL_PACK_SKIP_PIXELS</STRONG>	to i is	equivalent to		    incrementing the pointer by	in components or		    indices, where n is	the number of components or		    indices in each pixel.  Setting <STRONG>GL_PACK_SKIP_ROWS</STRONG>		    to j is equivalent to incrementing the pointer by		    jk components or indices, where k is the number of		    components or indices per row, as just computed in		    the	<STRONG>GL_PACK_ROW_LENGTH</STRONG> section.	  <STRONG>GL_PACK_ALIGNMENT</STRONG>		    Specifies the alignment requirements for the start		    of each pixel row in memory.  The allowable	values		    are	1 (byte-alignment), 2 (rows aligned to even-		    numbered bytes), 4 (word-alignment), and 8 (rows		    start on double-word boundaries).	  The other six	of the twelve storage parameters affect	how	  pixel	data is	read from client memory.  These	values are	  significant for <STRONG>fglDrawPixels</STRONG>, <STRONG>fglTexImage1D</STRONG>,	<STRONG>fglTexImage2D</STRONG>,	  <STRONG>fglTexSubImage1D</STRONG>, <STRONG>fglTexSubImage2D</STRONG>, <STRONG>fglBitmap</STRONG>, and	  <STRONG>fglPolygonStipple</STRONG>.  They are as follows:	  <STRONG>GL_UNPACK_SWAP_BYTES</STRONG>	       If true,	byte ordering for multibyte color components,	       depth components, color indices,	or stencil indices is	       reversed.  That is, if a	four-byte component consists	       of bytes	b , b ,	b , b ,	it is taken from memory	as b ,	       b , b , b 0if <STRONG>GL_UNPACK_SWAP_BYTES</STRONG> is true.	    3	       <STRONG>GL_UNPACK_SWAP_BYTES</STRONG> has	no effect on the memory	order	       of components within a pixel, only on the order of	       bytes within components or indices.  For	example, the	       three components	of a <STRONG>GL_RGB</STRONG> format pixel are always	       stored with red first, green second, and	blue third,	       regardless of the value of <STRONG>GL_UNPACK_SWAP_BYTES</STRONG>.	  <STRONG>GL_UNPACK_LSB_FIRST</STRONG>	       If true,	bits are ordered within	a byte from least	       significant to most significant;	otherwise, the first	       bit in each byte	is the most significant	one.  This is	       relevant	only for bitmap	data.	  <STRONG>GL_UNPACK_ROW_LENGTH</STRONG>	       If greater than 0, <STRONG>GL_UNPACK_ROW_LENGTH</STRONG> defines the	       number of pixels	in a row.  If the first	pixel of a row	       is placed at location p in memory, then the location of	       the first pixel of the next row is obtained by skipping				      (				      |nl      s<EM>&gt;</EM>a				  k = |<STRONG>_</STRONG>|<STRONG>___</STRONG>|  s&lt;a				      |s| a |				      (	       components or indices, where n is the number of	       components or indices in	a pixel, l is the number of	       pixels in a row (<STRONG>GL_UNPACK_ROW_LENGTH</STRONG> if	it is greater	       than 0, the width argument to the pixel routine	       otherwise), a is	the value of <STRONG>GL_UNPACK_ALIGNMENT</STRONG>, and	       s is the	size, in bytes,	of a single component (if a&lt;s,	       then it is as if	a=s).  In the case of 1-bit values,	       the location of the next	row is obtained	by skipping				     k = 8a|<STRONG>__</STRONG>|					   |8a|	       components or indices.	       The word	<EM>component</EM> in this description refers to	the	       nonindex	values red, green, blue, alpha,	and depth.	       Storage format <STRONG>GL_RGB</STRONG>, for example, has three	       components per pixel:  first red, then green, and	       finally blue.	  <STRONG>GL_UNPACK_SKIP_PIXELS</STRONG>	and <STRONG>GL_UNPACK_SKIP_ROWS</STRONG>	       These values are	provided as a convenience to the	       programmer; they	provide	no functionality that cannot	       be duplicated by	incrementing the pointer passed	to	       <STRONG>fglDrawPixels</STRONG>, <STRONG>fglTexImage1D</STRONG>, <STRONG>fglTexImage2D</STRONG>,	       <STRONG>fglTexSubImage1D</STRONG>, <STRONG>fglTexSubImage2D</STRONG>, <STRONG>fglBitmap</STRONG>, or	       <STRONG>fglPolygonStipple</STRONG>.  Setting <STRONG>GL_UNPACK_SKIP_PIXELS</STRONG> to i	       is equivalent to	incrementing the pointer by in	       components or indices, where n is the number of	       components or indices in	each pixel.  Setting	       <STRONG>GL_UNPACK_SKIP_ROWS</STRONG> to j	is equivalent to incrementing	       the pointer by jk components or indices,	where k	is the	       number of components or indices per row,	as just	       computed	in the <STRONG>GL_UNPACK_ROW_LENGTH</STRONG> section.	  <STRONG>GL_UNPACK_ALIGNMENT</STRONG>	       Specifies the alignment requirements for	the start of	       each pixel row in memory.  The allowable	values are 1	       (byte-alignment), 2 (rows aligned to even-numbered	       bytes), 4 (word-alignment), and 8 (rows start on	       double-word boundaries).	  The following	table gives the	type, initial value, and range	  of valid values for each storage parameter that can be set	  with <STRONG>fglPixelStore</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_PACK_SWAP_BYTES</STRONG>   |	boolean	|     false	| true or false	|       |  <STRONG>GL_PACK_LSB_FIRST</STRONG>   |	boolean	|     false	| true or false	|       | <STRONG>GL_PACK_ROW_LENGTH</STRONG>   |	integer	|	0	|    [0,oo)	|       |  <STRONG>GL_PACK_SKIP_ROWS</STRONG>   |	integer	|	0	|    [0,oo)	|       | <STRONG>GL_PACK_SKIP_PIXELS</STRONG>  |	integer	|	0	|    [0,oo)	|       |  <STRONG>GL_PACK_ALIGNMENT</STRONG>   |	integer	|	4	| 1, 2,	4, or 8	|       <EM>|</EM>______________________<EM>|</EM>_________<EM>|</EM>_______________<EM>|</EM>_______________|       |<STRONG>GL_UNPACK_SWAP_BYTES</STRONG>  |	boolean	|     false	| true or false	|       | <STRONG>GL_UNPACK_LSB_FIRST</STRONG>  |	boolean	|     false	| true or false	|       |<STRONG>GL_UNPACK_ROW_LENGTH</STRONG>  |	integer	|	0	|    [0,oo)	|       | <STRONG>GL_UNPACK_SKIP_ROWS</STRONG>  |	integer	|	0	|    [0,oo)	|       <EM>|</EM>______________________<EM>|</EM>_________<EM>|</EM>_______________<EM>|</EM>_______________|       |<STRONG>GL_UNPACK_SKIP_PIXELS</STRONG> |	integer	|	0	|    [0,oo)	|       | <STRONG>GL_UNPACK_ALIGNMENT</STRONG>  |	integer	|	4	| 1, 2,	4, or 8	|       <EM>|</EM>______________________<EM>|</EM>_________<EM>|</EM>_______________<EM>|</EM>_______________|	  <STRONG>fglPixelStoref</STRONG> can be	used to	set any	pixel store parameter.	  If the parameter type	is boolean, then if <EM>param</EM> is 0,	the	  parameter is false; otherwise	it is set to true.  If <EM>pname</EM>	  is a integer type parameter, <EM>param</EM> is	rounded	to the nearest	  integer.	  Likewise, <STRONG>fglPixelStorei</STRONG> can also be used to set any of the	  pixel	store parameters.  Boolean parameters are set to false	  if <EM>param</EM> is 0	and true otherwise.     <STRONG>NOTES</STRONG>	  The pixel storage modes in effect when <STRONG>fglDrawPixels</STRONG>,	  <STRONG>fglReadPixels</STRONG>, <STRONG>fglTexImage1D</STRONG>,	<STRONG>fglTexImage2D</STRONG>,	  <STRONG>fglTexSubImage1D</STRONG>, <STRONG>fglTexSubImage2D</STRONG>, <STRONG>fglBitmap</STRONG>, or	  <STRONG>fglPolygonStipple</STRONG> is placed in a display list	control	the	  interpretation of memory data.  The pixel storage modes in	  effect when a	display	list is	executed are not significant.	  Pixel	storage	modes are client state and must	be pushed and	  restored using	  <STRONG>fglPushClientAttrib</STRONG> and <STRONG>fglPopClientAttrib</STRONG>.     <STRONG>ERRORS</STRONG>	  <STRONG>GL_INVALID_ENUM</STRONG> is generated if <EM>pname</EM>	is not an accepted	  value.	  <STRONG>GL_INVALID_VALUE</STRONG> is generated	if a negative row length,	  pixel	skip, or row skip value	is specified, or if alignment	  is specified as other	than 1,	2, 4, or 8.	  <STRONG>GL_INVALID_OPERATION</STRONG> is generated if <STRONG>fglPixelStore</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_PACK_SWAP_BYTES</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_PACK_LSB_FIRST</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_PACK_ROW_LENGTH</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_PACK_SKIP_ROWS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_PACK_SKIP_PIXELS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_PACK_ALIGNMENT</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_UNPACK_SWAP_BYTES</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_UNPACK_LSB_FIRST</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_UNPACK_ROW_LENGTH</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_UNPACK_SKIP_ROWS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_UNPACK_SKIP_PIXELS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_UNPACK_ALIGNMENT</STRONG>     <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG>	  <STRONG>fglBitmap</STRONG>, <STRONG>fglDrawPixels</STRONG>, <STRONG>fglPixelMap</STRONG>, <STRONG>fglPixelTransfer</STRONG>,	  <STRONG>fglPixelZoom</STRONG>,	  <STRONG>fglPolygonStipple</STRONG>, <STRONG>fglPushClientAttrib</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 + -