rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man3 / xhtml / glScissor.xml
CommitLineData
7faf1d71
AW
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
3<!-- saved from url=(0013)about:internet -->
4<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="opengl-man.css" /><title>glScissor</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /></head><body><div class="refentry" title="glScissor"><a id="glScissor"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glScissor — define the scissor box</p></div><div class="refsynopsisdiv" title="C Specification"><h2>C Specification</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">void <b class="fsfunc">glScissor</b>(</code></td><td>GLint <var class="pdparam">x</var>, </td></tr><tr><td> </td><td>GLint <var class="pdparam">y</var>, </td></tr><tr><td> </td><td>GLsizei <var class="pdparam">width</var>, </td></tr><tr><td> </td><td>GLsizei <var class="pdparam">height</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1" title="Parameters"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>x</code></em>, </span><span class="term"><em class="parameter"><code>y</code></em></span></dt><dd><p>
5 Specify the lower left corner of the scissor box.
6 Initially (0, 0).
7 </p></dd><dt><span class="term"><em class="parameter"><code>width</code></em>, </span><span class="term"><em class="parameter"><code>height</code></em></span></dt><dd><p>
8 Specify the width and height of the scissor box.
9 When a GL context is first attached to a window,
10 <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> are set to the dimensions of that
11 window.
12 </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="description"></a><h2>Description</h2><p>
13 <code class="function">glScissor</code> defines a rectangle, called the scissor box,
14 in window coordinates.
15 The first two arguments,
16 <em class="parameter"><code>x</code></em> and <em class="parameter"><code>y</code></em>,
17 specify the lower left corner of the box.
18 <em class="parameter"><code>width</code></em> and <em class="parameter"><code>height</code></em> specify the width and height of the box.
19 </p><p>
20 To enable and disable the scissor test, call
21 <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a> and <a class="citerefentry" href="glDisable.xml"><span class="citerefentry"><span class="refentrytitle">glDisable</span></span></a> with argument
22 <code class="constant">GL_SCISSOR_TEST</code>. The test is initially disabled.
23 While the test is enabled, only pixels that lie within the scissor box
24 can be modified by drawing commands.
25 Window coordinates have integer values at the shared corners of
26 frame buffer pixels.
27 <code class="code">glScissor(0,0,1,1)</code> allows modification of only the lower left
28 pixel in the window, and <code class="code">glScissor(0,0,0,0)</code> doesn't allow
29 modification of any pixels in the window.
30 </p><p>
31 When the scissor test is disabled,
32 it is as though the scissor box includes the entire window.
33 </p></div><div class="refsect1" title="Errors"><a id="errors"></a><h2>Errors</h2><p>
34 <code class="constant">GL_INVALID_VALUE</code> is generated if either <em class="parameter"><code>width</code></em> or <em class="parameter"><code>height</code></em> is negative.
35 </p></div><div class="refsect1" title="Associated Gets"><a id="associatedgets"></a><h2>Associated Gets</h2><p>
36 <a class="citerefentry" href="glGet.xml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_SCISSOR_BOX</code>
37 </p><p>
38 <a class="citerefentry" href="glIsEnabled.xml"><span class="citerefentry"><span class="refentrytitle">glIsEnabled</span></span></a> with argument <code class="constant">GL_SCISSOR_TEST</code>
39 </p></div><div class="refsect1" title="See Also"><a id="seealso"></a><h2>See Also</h2><p>
40 <a class="citerefentry" href="glEnable.xml"><span class="citerefentry"><span class="refentrytitle">glEnable</span></span></a>,
41 <a class="citerefentry" href="glViewport.xml"><span class="citerefentry"><span class="refentrytitle">glViewport</span></span></a>
42 </p></div><div class="refsect1" title="Copyright"><a id="Copyright"></a><h2>Copyright</h2><p>
43 Copyright <span class="trademark"></span>© 1991-2006
44 Silicon Graphics, Inc. This document is licensed under the SGI
45 Free Software B License. For details, see
46 <a class="ulink" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
47 </p></div></div></body></html>