/ comp / gb.opengl / gl / hint
Gl.Hint (gb.opengl)
Syntax

    STATIC SUB Hint ( Target AS Integer, Mode AS Integer )

### Specify implementation-specific hints

#### Parameters

- Target specifies a symbolic constant indicating the behavior to be controlled. Gl.GL_FOG_HINT, Gl.GL_LINE_SMOOTH_HINT, Gl.GL_PERSPECTIVE_CORRECTION_HINT, Gl.GL_POINT_SMOOTH_HINT, and Gl.GL_POLYGON_SMOOTH_HINT are accepted.

- Mode specifies a symbolic constant indicating the desired behavior. Gl.GL_FASTEST, Gl.GL_NICEST, and Gl.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:

- Gl.GL_FASTEST the most efficient option should be chosen.

- Gl.GL_NICEST the most correct, or highest quality, option should be chosen.

- Gl.GL_DONT_CARE the client doesn't have a 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.GL_FOG_HINT indicates the accuracy of fog calculation. If per-pixel fog calculation is not efficiently supported by the GL implementation, hinting Gl.GL_DONT_CARE or Gl.GL_FASTEST can result in per-vertex calculation of fog effects.

- Gl.GL_LINE_SMOOTH_HINT indicates the sampling quality of antialiased lines. Hinting Gl.GL_NICEST can result in more pixel fragments being generated during rasterization, if a larger filter function is applied.

- Gl.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.GL_DONT_CARE or Gl.GL_FASTEST can result in simple linear interpolation of colors and/or texture coordinates.

- Gl.GL_POINT_SMOOTH_HINT indicates the sampling quality of antialiased points. Hinting Gl.GL_NICEST can result in more pixel fragments being generated during rasterization, if a larger filter function is applied.

- Gl.GL_POLYGON_SMOOTH_HINT indicates the sampling quality of antialiased polygons. Hinting Gl.GL_NICEST can result in more pixel fragments being generated during rasterization, if a larger filter function is applied.

| The interpretation of hints depends on the implementation. Gl.Hint can be ignored.

#### Errors

Gl.GL_INVALID_ENUM is generated if target or mode is not an accepted value.
Gl.GL_INVALID_OPERATION is generated if Gl.Hint is called between a call to Gl.Begin and the corresponding call to Gl.End.