---
name: "glHint"
section: "3x"
platform: "linux"
package: "xlibmesa-gl-dev"
version: "4.3.0.dfsg.1-14sarge7"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/glHint"
---

# glHint(3x)

specify implementation-specific hints

## NAME

**glHint** - specify implementation-specific hints

## C SPECIFICATION

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. The initial value for each *target* is **GL\_DONT\_CARE**.  *mode* can be one of the following:

- **GL\_FASTEST**

  The most efficient option should be chosen.

- **GL\_NICEST**

  The most correct, or highest quality, option should be chosen.

- **GL\_DONT\_CARE**

  No preference.

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 as follows:

- **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. If a larger filter function is applied, hinting **GL\_NICEST** can result in more pixel fragments being generated during rasterization,

- **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/or texture coordinates.

- **GL\_POINT\_SMOOTH\_HINT**

  Indicates the sampling quality of antialiased points. If a larger filter function is applied, hinting **GL\_NICEST** can result in more pixel fragments being generated during rasterization,

- **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.

## NOTES

The interpretation of hints depends on the implementation. Some implementations ignore **glHint** settings.

## ERRORS

**GL\_INVALID\_ENUM** is generated if either *target* or *mode* is not an accepted value.

**GL\_INVALID\_OPERATION** is generated if **glHint** is executed between the execution of **glBegin** and the corresponding execution of **glEnd**.
