Commit | Line | Data |
---|---|---|
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>glHint - OpenGL 4 Reference Pages</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /></head><body><div class="refentry" lang="en" xml:lang="en"><a id="glHint"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glHint — specify implementation-specific hints</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><p><code class="funcdef">void <b class="fsfunc">glHint</b>(</code>GLenum <var class="pdparam">target</var>, GLenum <var class="pdparam">mode</var><code>)</code>;</p></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>target</code></em></span></dt><dd><p> | |
5 | Specifies a symbolic constant indicating the behavior to be controlled. | |
6 | <code class="constant">GL_LINE_SMOOTH_HINT</code>, | |
7 | <code class="constant">GL_POLYGON_SMOOTH_HINT</code>, | |
8 | <code class="constant">GL_TEXTURE_COMPRESSION_HINT</code>, and | |
9 | <code class="constant">GL_FRAGMENT_SHADER_DERIVATIVE_HINT</code> | |
10 | are accepted. | |
11 | </p></dd><dt><span class="term"><em class="parameter"><code>mode</code></em></span></dt><dd><p> | |
12 | Specifies a symbolic constant indicating the desired behavior. | |
13 | <code class="constant">GL_FASTEST</code>, | |
14 | <code class="constant">GL_NICEST</code>, and | |
15 | <code class="constant">GL_DONT_CARE</code> are accepted. | |
16 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p> | |
17 | Certain aspects of GL behavior, | |
18 | when there is room for interpretation, | |
19 | can be controlled with hints. | |
20 | A hint is specified with two arguments. | |
21 | <em class="parameter"><code>target</code></em> is a symbolic | |
22 | constant indicating the behavior to be controlled, | |
23 | and <em class="parameter"><code>mode</code></em> is another symbolic constant indicating the desired | |
24 | behavior. The initial value for each <em class="parameter"><code>target</code></em> is <code class="constant">GL_DONT_CARE</code>. | |
25 | <em class="parameter"><code>mode</code></em> can be one of the following: | |
26 | </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_FASTEST</code></span></dt><dd><p> | |
27 | </p><p> | |
28 | The most efficient option should be chosen. | |
29 | </p></dd><dt><span class="term"><code class="constant">GL_NICEST</code></span></dt><dd><p> | |
30 | </p><p> | |
31 | The most correct, | |
32 | or highest quality, | |
33 | option should be chosen. | |
34 | </p></dd><dt><span class="term"><code class="constant">GL_DONT_CARE</code></span></dt><dd><p> | |
35 | </p><p> | |
36 | No preference. | |
37 | </p></dd></dl></div><p> | |
38 | Though the implementation aspects that can be hinted are well defined, | |
39 | the interpretation of the hints depends on the implementation. | |
40 | The hint aspects that can be specified with <em class="parameter"><code>target</code></em>, | |
41 | along with suggested semantics, | |
42 | are as follows: | |
43 | </p><div class="variablelist"><dl><dt><span class="term"><code class="constant">GL_FRAGMENT_SHADER_DERIVATIVE_HINT</code></span></dt><dd><p> | |
44 | </p><p> | |
45 | Indicates the accuracy of the derivative calculation for the GL shading language fragment processing built-in functions: | |
46 | <code class="constant">dFdx</code>, <code class="constant">dFdy</code>, and <code class="constant">fwidth</code>. | |
47 | </p></dd><dt><span class="term"><code class="constant">GL_LINE_SMOOTH_HINT</code></span></dt><dd><p> | |
48 | </p><p> | |
49 | Indicates the sampling quality of antialiased lines. | |
50 | If a larger filter function is applied, hinting <code class="constant">GL_NICEST</code> can | |
51 | result in more pixel fragments being generated during rasterization. | |
52 | </p></dd><dt><span class="term"><code class="constant">GL_POLYGON_SMOOTH_HINT</code></span></dt><dd><p> | |
53 | </p><p> | |
54 | Indicates the sampling quality of antialiased polygons. | |
55 | Hinting <code class="constant">GL_NICEST</code> can result in more pixel fragments being generated | |
56 | during rasterization, | |
57 | if a larger filter function is applied. | |
58 | </p></dd><dt><span class="term"><code class="constant">GL_TEXTURE_COMPRESSION_HINT</code></span></dt><dd><p> | |
59 | </p><p> | |
60 | Indicates the quality and performance of the compressing texture images. | |
61 | Hinting <code class="constant">GL_FASTEST</code> indicates that texture images should be compressed | |
62 | as quickly as possible, while <code class="constant">GL_NICEST</code> indicates that texture images | |
63 | should be compressed with as little image quality loss as possible. | |
64 | <code class="constant">GL_NICEST</code> should be selected if the texture is to be retrieved by | |
65 | <a href="glGetCompressedTexImage.xml"><span class="citerefentry"><span class="refentrytitle">glGetCompressedTexImage</span></span></a> for reuse. | |
66 | </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p> | |
67 | The interpretation of hints depends on the implementation. | |
68 | Some implementations ignore <code class="function">glHint</code> settings. | |
69 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p> | |
70 | <code class="constant">GL_INVALID_ENUM</code> is generated if either <em class="parameter"><code>target</code></em> or <em class="parameter"><code>mode</code></em> is not | |
71 | an accepted value. | |
72 | </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="Copyright"></a><h2>Copyright</h2><p> | |
73 | Copyright <span class="trademark"></span>© 1991-2006 | |
74 | Silicon Graphics, Inc. This document is licensed under the SGI | |
75 | Free Software B License. For details, see | |
76 | <a href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>. | |
77 | </p></div></div></body></html> |