scissor.html

来自「计算机图形学~想必是很多人需要的~在此共享一下」· HTML 代码 · 共 112 行

HTML
112
字号
<HTML><BODY><PRE>     <STRONG>NAME</STRONG>	  <STRONG>glScissor</STRONG> - define the scissor box     <STRONG>C</STRONG> <STRONG>SPECIFICATION</STRONG>	  void <STRONG>glScissor</STRONG>( GLint	<EM>x</EM>,			  GLint	<EM>y</EM>,			  GLsizei <EM>width</EM>,			  GLsizei <EM>height</EM> )     <STRONG>PARAMETERS</STRONG>	  <EM>x</EM>, <EM>y</EM> Specify the lower left corner of	the scissor box.	       Initially (0, 0).	  <EM>width</EM>, <EM>height</EM>	       Specify the width and height of the scissor box.	 When	       a GL context is first attached to a window, <EM>width</EM> and	       <EM>height</EM> are set to the dimensions	of that	window.     <STRONG>DESCRIPTION</STRONG>	  <STRONG>glScissor</STRONG> defines a rectangle, called	the scissor box, in	  window coordinates.  The first two arguments,	<EM>x</EM> and <EM>y</EM>,	  specify the lower left corner	of the box.  <EM>width</EM> and <EM>height</EM>	  specify the width and	height of the box.	  To enable and	disable	the scissor test, call <STRONG>glEnable</STRONG>	and	  <STRONG>glDisable</STRONG> with argument <STRONG>GL_SCISSOR_TEST</STRONG>. The test is	  initially disabled. While the	test is	enabled, only pixels	  that lie within the scissor box can be modified by drawing	  commands.  Window coordinates	have integer values at the	  shared corners of frame buffer pixels.  glScissor(0,0,1,1)	  <STRONG>allows</STRONG> <STRONG>modification</STRONG> <STRONG>of</STRONG> <STRONG>only</STRONG> <STRONG>the</STRONG> <STRONG>lower</STRONG>	<STRONG>left</STRONG> <STRONG>pixel</STRONG> <STRONG>in</STRONG> <STRONG>the</STRONG>	  <STRONG>window,</STRONG> <STRONG>and</STRONG> <STRONG>glScissor(0,0,0,0)</STRONG> doesn't allow modification of	  any pixels in	the window.	  When the scissor test	is disabled, it	is as though the	  scissor box includes the entire window.     <STRONG>ERRORS</STRONG>	  <STRONG>GL_INVALID_VALUE</STRONG> is generated	if either <EM>width</EM>	or <EM>height</EM> is	  negative.	  <STRONG>GL_INVALID_OPERATION</STRONG> is generated if <STRONG>glScissor</STRONG> is executed	  between the execution	of <STRONG>glBegin</STRONG> and the corresponding	  execution of <STRONG>glEnd</STRONG>.     <STRONG>ASSOCIATED</STRONG>	<STRONG>GETS</STRONG>	  <STRONG>glGet</STRONG>	with argument <STRONG>GL_SCISSOR_BOX</STRONG>	  <STRONG>glIsEnabled</STRONG> with argument <STRONG>GL_SCISSOR_TEST</STRONG>     <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG>	  <STRONG>glEnable</STRONG>, <STRONG>glViewport</STRONG></PRE></BODY></HTML>

⌨️ 快捷键说明

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