Class ARBPolygonOffsetClamp
- java.lang.Object
-
- org.lwjgl.opengl.ARBPolygonOffsetClamp
-
public class ARBPolygonOffsetClamp extends java.lang.Object
Native bindings to the ARB_polygon_offset_clamp extension.This extension adds a new parameter to the polygon offset function that clamps the calculated offset to a minimum or maximum value. The clamping functionality is useful when polygons are nearly parallel to the view direction because their high slopes can result in arbitrarily large polygon offsets. In the particular case of shadow mapping, the lack of clamping can produce the appearance of unwanted holes when the shadow casting polygons are offset beyond the shadow receiving polygons, and this problem can be alleviated by enforcing a maximum offset value.
Requires
OpenGL 3.3
.
-
-
Field Summary
Fields Modifier and Type Field Description static int
GL_POLYGON_OFFSET_CLAMP
Accepted by thepname
parameters of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
glPolygonOffsetClamp(float factor, float units, float clamp)
The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon.
-
-
-
Field Detail
-
GL_POLYGON_OFFSET_CLAMP
public static final int GL_POLYGON_OFFSET_CLAMP
Accepted by thepname
parameters of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev.- See Also:
- Constant Field Values
-
-
Method Detail
-
glPolygonOffsetClamp
public static void glPolygonOffsetClamp(float factor, float units, float clamp)
The depth values of all fragments generated by the rasterization of a polygon may be offset by a single value that is computed for that polygon. This function determines this value.factor
scales the maximum depth slope of the polygon, andunits
scales an implementation-dependent constant that relates to the usable resolution of the depth buffer. The resulting values are summed to produce the polygon offset value, which may then be clamped to a minimum or maximum value specified byclamp
.The values
factor
,units
, andclamp
may each be positive, negative, or zero. Calling the commandPolygonOffset
is equivalent to calling the commandPolygonOffsetClamp
with clamp equal to zero.- Parameters:
factor
- scales the maximum depth slope of the polygonunits
- scales an implementation-dependent constant that relates to the usable resolution of the depth bufferclamp
- the minimum or maximum polygon offset value
-
-