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