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

📄 fglaccum.html

📁 计算机图形学~想必是很多人需要的~在此共享一下
💻 HTML
字号:
<HTML><BODY><PRE>     <STRONG>NAME</STRONG>	  <STRONG>fglAccum</STRONG> - operate on	the accumulation buffer     <STRONG>FORTRAN</STRONG> <STRONG>SPECIFICATION</STRONG>	  SUBROUTINE <STRONG>fglAccum</STRONG>( INTEGER*4 <EM>op</EM>,			       REAL*4 <EM>value</EM> )     <STRONG>PARAMETERS</STRONG>	  <EM>op</EM>	 Specifies the accumulation buffer operation.		 Symbolic constants <STRONG>GL_ACCUM</STRONG>, <STRONG>GL_LOAD</STRONG>, <STRONG>GL_ADD</STRONG>,		 <STRONG>GL_MULT</STRONG>, and <STRONG>GL_RETURN</STRONG>	are accepted.	  <EM>value</EM>	 Specifies a floating-point value used in the		 accumulation buffer operation.	 <EM>op</EM> determines how		 <EM>value</EM> is used.     <STRONG>DESCRIPTION</STRONG>	  The accumulation buffer is an	extended-range color buffer.	  Images are not rendered into it.  Rather, images rendered	  into one of the color	buffers	are added to the contents of	  the accumulation buffer after	rendering.  Effects such as	  antialiasing (of points, lines, and polygons), motion	blur,	  and depth of field can be created by accumulating images	  generated with different transformation matrices.	  Each pixel in	the accumulation buffer	consists of red,	  green, blue, and alpha values.  The number of	bits per	  component in the accumulation	buffer depends on the	  implementation. You can examine this number by calling	  <STRONG>fglGetIntegerv</STRONG> four times, with arguments <STRONG>GL_ACCUM_RED_BITS</STRONG>,	  <STRONG>GL_ACCUM_GREEN_BITS</STRONG>, <STRONG>GL_ACCUM_BLUE_BITS</STRONG>, and	  <STRONG>GL_ACCUM_ALPHA_BITS</STRONG>.	Regardless of the number of bits per	  component, the range of values stored	by each	component is	  [-1, 1].  The	accumulation buffer pixels are mapped one-to-	  one with frame buffer	pixels.	  <STRONG>fglAccum</STRONG> operates on the accumulation	buffer.	 The first	  argument, <EM>op</EM>,	is a symbolic constant that selects an	  accumulation buffer operation.  The second argument, <EM>value</EM>,	  is a floating-point value to be used in that operation.	  Five operations are specified:  <STRONG>GL_ACCUM</STRONG>, <STRONG>GL_LOAD</STRONG>, <STRONG>GL_ADD</STRONG>,	  <STRONG>GL_MULT</STRONG>, and <STRONG>GL_RETURN</STRONG>.	  All accumulation buffer operations are limited to the	area	  of the current scissor box and applied identically to	the	  red, green, blue, and	alpha components of each pixel.	 If a	  <STRONG>fglAccum</STRONG> operation results in	a value	outside	the range [-1,	  1], the contents of an accumulation buffer pixel component	  are undefined.	  The operations are as	follows:	  <STRONG>GL_ACCUM</STRONG>	Obtains	R, G, B, and A values from the buffer			currently selected for reading (see			<STRONG>fglReadBuffer</STRONG>).	 Each component	value is			divided	by 2n-1, where n is the	number of bits			allocated to each color	component in the			currently selected buffer.  The	result is a			floating-point value in	the range [0, 1],			which is multiplied by <EM>value</EM> and added to the			corresponding pixel component in the			accumulation buffer, thereby updating the			accumulation buffer.	  <STRONG>GL_LOAD</STRONG>	Similar	to <STRONG>GL_ACCUM</STRONG>, except that the current			value in the accumulation buffer is not	used			in the calculation of the new value.  That is,			the R, G, B, and A values from the currently			selected buffer	are divided by 2n-1,			multiplied by <EM>value</EM>, and then stored in	the			corresponding accumulation buffer cell,			overwriting the	current	value.	  <STRONG>GL_ADD</STRONG>	Adds <EM>value</EM> to each R, G, B, and	A in the			accumulation buffer.	  <STRONG>GL_MULT</STRONG>	Multiplies each	R, G, B, and A in the			accumulation buffer by <EM>value</EM> and returns the			scaled component to its	corresponding			accumulation buffer location.	  <STRONG>GL_RETURN</STRONG>	Transfers accumulation buffer values to	the			color buffer or	buffers	currently selected for			writing.  Each R, G, B,	and A component	is			multiplied by <EM>value</EM>, then multiplied by	2n-1,			clamped	to the range [0,2n-1], and stored in			the corresponding display buffer cell.	The			only fragment operations that are applied to			this transfer are pixel	ownership, scissor,			dithering, and color writemasks.	  To clear the accumulation buffer, call <STRONG>fglClearAccum</STRONG> with R,	  G, B,	and A values to	set it to, then	call <STRONG>fglClear</STRONG> with the	  accumulation buffer enabled.     <STRONG>NOTES</STRONG>	  Only pixels within the current scissor box are updated by a	  <STRONG>fglAccum</STRONG> operation.     <STRONG>ERRORS</STRONG>	  <STRONG>GL_INVALID_ENUM</STRONG> is generated if <EM>op</EM> is	not an accepted	value.	  <STRONG>GL_INVALID_OPERATION</STRONG> is generated if there is	no	  accumulation buffer.	  <STRONG>GL_INVALID_OPERATION</STRONG> is generated if <STRONG>fglAccum</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_ACCUM_RED_BITS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_ACCUM_GREEN_BITS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_ACCUM_BLUE_BITS</STRONG>	  <STRONG>fglGet</STRONG> with argument <STRONG>GL_ACCUM_ALPHA_BITS</STRONG>     <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG>	  <STRONG>fglBlendFunc</STRONG>,	<STRONG>fglClear</STRONG>, <STRONG>fglClearAccum</STRONG>, <STRONG>fglCopyPixels</STRONG>,	  <STRONG>fglGet</STRONG>, <STRONG>fglLogicOp</STRONG>, <STRONG>fglPixelStore</STRONG>, <STRONG>fglPixelTransfer</STRONG>,	  <STRONG>fglReadBuffer</STRONG>, <STRONG>fglReadPixels</STRONG>,	<STRONG>fglScissor</STRONG>, <STRONG>fglStencilOp</STRONG></PRE></BODY></HTML>

⌨️ 快捷键说明

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