mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-28 04:45:39 +00:00
110 lines
4.9 KiB
XML
110 lines
4.9 KiB
XML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
|
||
|
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
|
||
|
<refentry id="glScissor">
|
||
|
<refmeta>
|
||
|
<refmetainfo>
|
||
|
<copyright>
|
||
|
<year>1991-2006</year>
|
||
|
<holder>Silicon Graphics, Inc.</holder>
|
||
|
</copyright>
|
||
|
</refmetainfo>
|
||
|
<refentrytitle>glScissor</refentrytitle>
|
||
|
<manvolnum>3G</manvolnum>
|
||
|
</refmeta>
|
||
|
<refnamediv>
|
||
|
<refname>glScissor</refname>
|
||
|
<refpurpose>define the scissor box</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsynopsisdiv><title>C Specification</title>
|
||
|
<funcsynopsis>
|
||
|
<funcprototype>
|
||
|
<funcdef>void <function>glScissor</function></funcdef>
|
||
|
<paramdef>GLint <parameter>x</parameter></paramdef>
|
||
|
<paramdef>GLint <parameter>y</parameter></paramdef>
|
||
|
<paramdef>GLsizei <parameter>width</parameter></paramdef>
|
||
|
<paramdef>GLsizei <parameter>height</parameter></paramdef>
|
||
|
</funcprototype>
|
||
|
</funcsynopsis>
|
||
|
</refsynopsisdiv>
|
||
|
<refsect1 id="parameters"><title>Parameters</title>
|
||
|
<variablelist>
|
||
|
<varlistentry>
|
||
|
<term><parameter>x</parameter></term>
|
||
|
<term><parameter>y</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Specify the lower left corner of the scissor box.
|
||
|
Initially (0, 0).
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
<varlistentry>
|
||
|
<term><parameter>width</parameter></term>
|
||
|
<term><parameter>height</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
Specify the width and height of the scissor box.
|
||
|
When a GL context is first attached to a window,
|
||
|
<parameter>width</parameter> and <parameter>height</parameter> are set to the dimensions of that
|
||
|
window.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
</variablelist>
|
||
|
</refsect1>
|
||
|
<refsect1 id="description"><title>Description</title>
|
||
|
<para>
|
||
|
<function>glScissor</function> defines a rectangle, called the scissor box,
|
||
|
in window coordinates.
|
||
|
The first two arguments,
|
||
|
<parameter>x</parameter> and <parameter>y</parameter>,
|
||
|
specify the lower left corner of the box.
|
||
|
<parameter>width</parameter> and <parameter>height</parameter> specify the width and height of the box.
|
||
|
</para>
|
||
|
<para>
|
||
|
To enable and disable the scissor test, call
|
||
|
<citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry> and <citerefentry><refentrytitle>glDisable</refentrytitle></citerefentry> with argument
|
||
|
<constant>GL_SCISSOR_TEST</constant>. 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.
|
||
|
<code>glScissor(0,0,1,1)</code> allows modification of only the lower left
|
||
|
pixel in the window, and <code>glScissor(0,0,0,0)</code> doesn't allow
|
||
|
modification of any pixels in the window.
|
||
|
</para>
|
||
|
<para>
|
||
|
When the scissor test is disabled,
|
||
|
it is as though the scissor box includes the entire window.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="errors"><title>Errors</title>
|
||
|
<para>
|
||
|
<constant>GL_INVALID_VALUE</constant> is generated if either <parameter>width</parameter> or <parameter>height</parameter> is negative.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="associatedgets"><title>Associated Gets</title>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glGet</refentrytitle></citerefentry> with argument <constant>GL_SCISSOR_BOX</constant>
|
||
|
</para>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glIsEnabled</refentrytitle></citerefentry> with argument <constant>GL_SCISSOR_TEST</constant>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="seealso"><title>See Also</title>
|
||
|
<para>
|
||
|
<citerefentry><refentrytitle>glEnable</refentrytitle></citerefentry>,
|
||
|
<citerefentry><refentrytitle>glViewport</refentrytitle></citerefentry>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 id="Copyright"><title>Copyright</title>
|
||
|
<para>
|
||
|
Copyright <trademark class="copyright"></trademark> 1991-2006
|
||
|
Silicon Graphics, Inc. This document is licensed under the SGI
|
||
|
Free Software B License. For details, see
|
||
|
<ulink url="http://oss.sgi.com/projects/FreeB/">http://oss.sgi.com/projects/FreeB/</ulink>.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
</refentry>
|