rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / man4 / glScissorIndexed.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id="glScissorIndexed">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2010</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>glScissorIndexed</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>glScissorIndexed</refname>
17 <refpurpose>define the scissor box for a specific viewport</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>C Specification</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>void <function>glScissorIndexed</function></funcdef>
23 <paramdef>GLuint <parameter>index</parameter></paramdef>
24 <paramdef>GLint <parameter>left</parameter></paramdef>
25 <paramdef>GLint <parameter>bottom</parameter></paramdef>
26 <paramdef>GLsizei <parameter>width</parameter></paramdef>
27 <paramdef>GLsizei <parameter>height</parameter></paramdef>
28 </funcprototype>
29 <funcprototype>
30 <funcdef>void <function>glScissorIndexedv</function></funcdef>
31 <paramdef>GLuint <parameter>index</parameter></paramdef>
32 <paramdef>const GLint *<parameter>v</parameter></paramdef>
33 = </funcprototype>
34 </funcsynopsis>
35 </refsynopsisdiv>
36 <refsect1 id="parameters"><title>Parameters</title>
37 <variablelist>
38 <varlistentry>
39 <term><parameter>index</parameter></term>
40 <listitem>
41 <para>
42 Specifies the index of the viewport whose scissor box to modify.
43 </para>
44 </listitem>
45 </varlistentry>
46 <varlistentry>
47 <term><parameter>left</parameter></term>
48 <term><parameter>bottom</parameter></term>
49 <listitem>
50 <para>
51 Specify the coordinate of the bottom left corner of the scissor box, in pixels.
52 </para>
53 </listitem>
54 </varlistentry>
55 <varlistentry>
56 <term><parameter>width</parameter></term>
57 <term><parameter>height</parameter></term>
58 <listitem>
59 <para>
60 Specify ths dimensions of the scissor box, in pixels.
61 </para>
62 </listitem>
63 </varlistentry>
64 <varlistentry>
65 <term><parameter>v</parameter></term>
66 <listitem>
67 <para>
68 For <function>glScissorIndexedv</function>, specifies the address of an array containing the left, bottom, width and height of each
69 scissor box, in that order.
70 </para>
71 </listitem>
72 </varlistentry>
73 </variablelist>
74 </refsect1>
75 <refsect1 id="description"><title>Description</title>
76 <para>
77 <function>glScissorIndexed</function> defines the scissor box for a specified viewport.
78 <parameter>index</parameter> specifies the index of scissor box to modify.
79 <parameter>index</parameter> must be less than the value of <constant>GL_MAX_VIEWPORTS</constant>.
80 For <function>glScissorIndexed</function>, <parameter>left</parameter>, <parameter>bottom</parameter>,
81 <parameter>width</parameter> and <parameter>height</parameter> specify the left, bottom, width
82 and height of the scissor box, in pixels, respectively.
83 For <function>glScissorIndexedv</function>, <parameter>v</parameter> specifies the address of an
84 array containing integers specifying the lower left corner of the scissor box, and the width and
85 height of the scissor box, in that order.
86 </para>
87 <para>
88 To enable and disable the scissor test, call
89 <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
90 <constant>GL_SCISSOR_TEST</constant>. The test is initially disabled for all viewports.
91 While the test is enabled, only pixels that lie within the scissor box
92 can be modified by drawing commands.
93 Window coordinates have integer values at the shared corners of
94 frame buffer pixels.
95 <code>glScissor(0,0,1,1)</code> allows modification of only the lower left
96 pixel in the window, and <code>glScissor(0,0,0,0)</code> doesn't allow
97 modification of any pixels in the window.
98 </para>
99 <para>
100 When the scissor test is disabled,
101 it is as though the scissor box includes the entire window.
102 </para>
103 </refsect1>
104 <refsect1 id="errors"><title>Errors</title>
105 <para>
106 <constant>GL_INVALID_VALUE</constant> is generated if <parameter>index</parameter> is greater than or equal to
107 the value of <constant>GL_MAX_VIEWPORTS</constant>.
108 </para>
109 <para>
110 <constant>GL_INVALID_VALUE</constant> is generated if any width or height specified in the array <parameter>v</parameter> is negative.
111 </para>
112 </refsect1>
113 <refsect1 id="associatedgets"><title>Associated Gets</title>
114 <para>
115 <citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SCISSOR_BOX</constant>
116 </para>
117 <para>
118 <citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_SCISSOR_TEST</constant>
119 </para>
120 </refsect1>
121 <refsect1 id="seealso"><title>See Also</title>
122 <para>
123 <citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
124 <citerefentry><refentrytitle>glScissor</refentrytitle></citerefentry>,
125 <citerefentry><refentrytitle>glScissorArray</refentrytitle></citerefentry>
126 </para>
127 </refsect1>
128 <refsect1 id="Copyright"><title>Copyright</title>
129 <para>
130 Copyright <trademark class="copyright"></trademark> 2010 Khronos Group.
131 This material may be distributed subject to the terms and conditions set forth in
132 the Open Publication License, v 1.0, 8 June 1999.
133 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
134 </para>
135 </refsect1>
136 </refentry>