glHint function
The glHint function specifies implementation-specific hints.
Syntax
void WINAPI glHint(
GLenum target,
GLenum mode
);
Parameters
-
target
-
A symbolic constant indicating the behavior to be controlled. The following symbolic constants, along with suggested semantics, are accepted.
Value Meaning - GL_FOG_HINT
Indicates the accuracy of fog calculation. If per-pixel fog calculation is not efficiently supported by the OpenGL 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 OpenGL implementation, hinting GL_DONT_CARE or GL_FASTEST can result in simple linear interpolation of colors and/or 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. -
mode
-
A symbolic constant indicating the desired behavior. The following symbolic constants are accepted.
Value Meaning - 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 doesn't have a preference.
Return value
This function does not return a value.
Error codes
The following error codes can be retrieved by the glGetError function.
Name | Meaning |
---|---|
|
target or mode was not an accepted value. |
|
The function was called between a call to glBegin and the corresponding call to glEnd. |
Remarks
When there is room for interpretation, you can control certain aspects of OpenGL behavior with hints. You specify a hint with two arguments. The target parameter is a symbolic constant indicating the behavior to be controlled, and mode is another symbolic constant indicating the desired behavior.
Though the implementation aspects that can be hinted are well defined, the interpretation of the hints depends on the implementation.
The glHint function can be ignored.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|
Library |
|
DLL |
|