<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:mml="http://www.w3.org/1998/Math/MathML"
><head><title>glHint</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"/><link rel="home" href="index.xml" title="PyOpenGL 2.0.1.07 Man Pages"/><link rel="up" href="reference-GL.xml" title="GL"/><link rel="previous" href="glGetTexParameter.3G.xml" title="glGetTexParameter"/><link rel="next" href="glHistogram.3G.xml" title="glHistogram"/></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">glHint</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="glGetTexParameter.3G.xml">Prev</a> </td><th width="60%" align="center">GL</th><td width="20%" align="right"> <a accesskey="n" href="glHistogram.3G.xml">Next</a></td></tr></table><hr/></div><div class="refentry" lang="en"><a name="glHint.3G"/><div class="titlepage"/><div class="refnamediv"><a name="glHint.3G-name"/><h2>Name</h2><p>glHint &#8212; specify implementation-specific hints</p></div><div class="refsynopsisdiv"><a name="glHint.3G-c_spec"/><h2>C Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code>void <tt>glHint</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code>GLenum <i><tt>target</tt></i>, GLenum <i><tt>mode</tt></i>);</code></td></tr></table></div><div class="refsynopsisdiv"><a name="glHint.3G-python_spec"/><h2>Python Specification</h2><table class="funcprototype" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><code><tt>glHint</tt></code></td><td valign="top"><code>(</code></td><td valign="top"><code><i><tt>target</tt></i>, <i><tt>mode</tt></i>) &#8594; <tt>None</tt></code></td></tr></table></div><div class="refsect1" lang="en"><a name="glHint.3G-parameters"/><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><i><tt>target</tt></i></span></dt><dd>
						Specifies a symbolic constant indicating the behavior to be controlled. <tt>GL_FOG_HINT</tt>,
						<tt>GL_LINE_SMOOTH_HINT</tt>, <tt>GL_PERSPECTIVE_CORRECTION_HINT</tt>,
						<tt>GL_POINT_SMOOTH_HINT</tt>, and <tt>GL_POLYGON_SMOOTH_HINT</tt> are accepted.
					</dd><dt><span class="term"><i><tt>mode</tt></i></span></dt><dd>
						Specifies a symbolic constant indicating the desired behavior. <tt>GL_FASTEST</tt>,
						<tt>GL_NICEST</tt>, and <tt>GL_DONT_CARE</tt> are accepted.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glHint.3G-description"/><h2>Description</h2><p>
			Certain aspects of GL behavior, when there is room for interpretation, can be controlled with hints. A hint is
			specified with two arguments. <i><tt>target</tt></i> is a symbolic constant indicating the behavior to be
			controlled, and <i><tt>mode</tt></i> is another symbolic constant indicating the desired behavior. The initial
			value for each <i><tt>target</tt></i> is <tt>GL_DONT_CARE</tt>. <i><tt>mode</tt></i> can be
			one of the following:
		</p><div class="variablelist"><dl><dt><span class="term"><tt>GL_FASTEST</tt></span></dt><dd>
						The most efficient option should be chosen.
					</dd><dt><span class="term"><tt>GL_NICEST</tt></span></dt><dd>
						The most correct, or highest quality, option should be chosen.
					</dd><dt><span class="term"><tt>GL_DONT_CARE</tt></span></dt><dd>
						No preference.
					</dd></dl></div><p>
			Though the implementation aspects that can be hinted are well defined, the interpretation of the hints depends on the
			implementation. The hint aspects that can be specified with <i><tt>target</tt></i>, along with suggested
			semantics, are as follows:
		</p><div class="variablelist"><dl><dt><span class="term"><tt>GL_FOG_HINT</tt></span></dt><dd>
						Indicates the accuracy of fog calculation. If per-pixel fog calculation is not efficiently supported by the
						GL implementation, hinting <tt>GL_DONT_CARE</tt> or <tt>GL_FASTEST</tt> can result
						in per-vertex calculation of fog effects.
					</dd><dt><span class="term"><tt>GL_LINE_SMOOTH_HINT</tt></span></dt><dd>
						Indicates the sampling quality of antialiased lines. If a larger filter function is applied, hinting
						<tt>GL_NICEST</tt> can result in more pixel fragments being generated during rasterization,
					</dd><dt><span class="term"><tt>GL_PERSPECTIVE_CORRECTION_HINT</tt></span></dt><dd>
						Indicates the quality of color and texture coordinate interpolation. If perspective-corrected parameter
						interpolation is not efficiently supported by the GL implementation, hinting
						<tt>GL_DONT_CARE</tt> or <tt>GL_FASTEST</tt> can result in simple linear
						interpolation of colors and/or texture coordinates.
					</dd><dt><span class="term"><tt>GL_POINT_SMOOTH_HINT</tt></span></dt><dd>
						Indicates the sampling quality of antialiased points. If a larger filter function is applied, hinting
						<tt>GL_NICEST</tt> can result in more pixel fragments being generated during rasterization,
					</dd><dt><span class="term"><tt>GL_POLYGON_SMOOTH_HINT</tt></span></dt><dd>
						Indicates the sampling quality of antialiased polygons. Hinting <tt>GL_NICEST</tt> can result
						in more pixel fragments being generated during rasterization, if a larger filter function is applied.
					</dd></dl></div></div><div class="refsect1" lang="en"><a name="glHint.3G-notes"/><h2>Notes</h2><p>
			The interpretation of hints depends on the implementation. Some implementations ignore <tt>glHint</tt>
			settings.
		</p></div><div class="refsect1" lang="en"><a name="glHint.3G-errors"/><h2>Errors</h2><p>
			<tt>GL_INVALID_ENUM</tt> is generated if either <i><tt>target</tt></i> or
			<i><tt>mode</tt></i> is not an accepted value.
		</p><p>
			<tt>GL_INVALID_OPERATION</tt> is generated if <tt>glHint</tt> is executed between the execution
			of <a href="glBegin.3G.xml"><tt>glBegin</tt></a> and the corresponding execution of <a href="glBegin.3G.xml"><tt>glEnd</tt></a>.
		</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="glGetTexParameter.3G.xml">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-GL.xml">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="glHistogram.3G.xml">Next</a></td></tr><tr><td width="40%" align="left" valign="top">glGetTexParameter </td><td width="20%" align="center"><a accesskey="h" href="index.xml">Home</a></td><td width="40%" align="right" valign="top"> glHistogram</td></tr></table></div></body></html>
