[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
OpenGL 1.1 for AIX: Reference Manual
glHint Subroutine
Purpose
Specifies implementation-specific hints.
Library
OpenGL C bindings library: libGL.a
C Syntax
void glHint(GLenum Target,
GLenum Mode)
Parameters
Target |
Specifies a symbolic constant indicating the behavior to be controlled. GL_FOG_HINT, GL_LINE_SMOOTH_HINT, GL_PERSPECTIVE_CORRECTION_HINT, GL_POINT_SMOOTH_HINT, and GL_POLYGON_SMOOTH_HINT are accepted. |
Mode |
Specifies a symbolic constant indicating the desired behavior. GL_FASTEST, GL_NICEST, and GL_DONT_CARE are accepted. |
Description
Certain aspects of GL behavior, when there is room for interpretation, can be controlled with hints. A hint is specified with two arguments. Target is a symbolic constant indicating the behavior to be controlled, and Mode is another symbolic constant indicating the desired behavior. Mode can be one of the following three:
GL_FASTEST |
The most efficient option should be chosen. |
GL_NICEST |
The most correct or highest quality option should be chosen. |
GL_DONT_CARE |
The client does not have a preference. This is the initial setting for all hints. |
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 Target, along with suggested semantics, are:
GL_FOG_HINT |
Indicates the accuracy of fog calculation. If per-pixel fog calculation is not efficiently supported by the GL implementation, hinting GL_DONT_CARE or GL_FASTEST can result in per-vertex calculation of fog effects. |
GL_LINE_SMOOTH_HINT |
Indicates the sampling quality of antialiased lines. Hinting GL_NICEST can result in more pixel fragments being generated during rasterization, if a larger filter function is applied. |
GL_PERSPECTIVE_CORRECTION_HINT |
Indicates the quality of color and texture coordinate interpolation. If perspective-corrected parameter interpolation is not efficiently supported by the GL implementation, hinting GL_DONT_CARE or GL_FASTEST can result in simple linear interpolation of colors and texture coordinates. |
GL_POINT_SMOOTH_HINT |
Indicates the sampling quality of antialiased points. Hinting GL_NICEST can result in more pixel fragments being generated during rasterization, if a larger filter function is applied. |
GL_POLYGON_SMOOTH_HINT |
Indicates the sampling quality of antialiased polygons. Hinting GL_NICEST can result in more pixel fragments being generated during rasterization, if a larger filter function is applied. |
GL_SUBPIXEL_HINT_IBM |
Indicates if primitives are rendered using subpixel sampling techniques. Hinting GL_NICEST can result in a greater accuracy of pixels turned on when a primitive is rendered. GL_FASTEST and GL_DONT_CARE may result in faster, non-subpixel positioned, rendering of some primitives. |
Parameters
Target |
Specifies a symbolic constant indicating the behavior to be controlled. GL_FOG_HINT, GL_LINE_SMOOTH_HINT, GL_PERSPECTIVE_CORRECTION_HINT, GL_POINT_SMOOTH_HINT, and GL_POLYGON_SMOOTH_HINT are accepted. |
Mode |
Specifies a symbolic constant indicating the desired behavior. GL_FASTEST, GL_NICEST, and GL_DONT_CARE are accepted. |
Notes
The interpretation of hints depends on the implementation. The glHint subroutine can be ignored.
Errors
GL_INVALID_ENUM |
Either Target or Mode is not an accepted value. |
GL_INVALID_OPERATION |
The glHint subroutine is called between a call to glBegin and the corresponding call to glEnd. |
Files
/usr/include/GL/gl.h |
Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
Related Information
The glBegin or glEnd subroutine.
OpenGL Overview.
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]