All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.opengl.ARBPolygonOffsetClamp Maven / Gradle / Ivy

Go to download

The most widely adopted 2D and 3D graphics API in the industry, bringing thousands of applications to a wide variety of computer platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.opengl;

import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;

/**
 * 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 {@link GL33 OpenGL 3.3}.

*/ public class ARBPolygonOffsetClamp { /** Accepted by the {@code pname} parameters of GetBooleanv, GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev. */ public static final int GL_POLYGON_OFFSET_CLAMP = 0x8E1B; static { GL.initialize(); } protected ARBPolygonOffsetClamp() { throw new UnsupportedOperationException(); } static boolean isAvailable(GLCapabilities caps) { return checkFunctions( caps.glPolygonOffsetClamp ); } // --- [ glPolygonOffsetClamp ] --- /** * 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. * *

{@code factor} scales the maximum depth slope of the polygon, and {@code units} 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 by {@code clamp}.

* *

The values {@code factor}, {@code units}, and {@code clamp} may each be positive, negative, or zero. Calling the command {@link GL11C#glPolygonOffset PolygonOffset} is equivalent * to calling the command {@code PolygonOffsetClamp} with clamp equal to zero.

* * @param factor scales the maximum depth slope of the polygon * @param units scales an implementation-dependent constant that relates to the usable resolution of the depth buffer * @param clamp the minimum or maximum polygon offset value */ public static void glPolygonOffsetClamp(@NativeType("GLfloat") float factor, @NativeType("GLfloat") float units, @NativeType("GLfloat") float clamp) { GL46C.glPolygonOffsetClamp(factor, units, clamp); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy