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

org.lwjgl.opengl.EXTProvokingVertex 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 EXT_provoking_vertex extension.
 * 
 * 

This extension provides an alternative provoking vertex convention for rendering lines, triangles, and (optionally depending on the implementation) * quads.

* *

The provoking vertex of a primitive is the vertex that determines the constant primary and secondary colors when flat shading is enabled.

* *

In OpenGL, the provoking vertex for triangle, quad, line, and (trivially) point primitives is the last vertex used to assemble the primitive. The * polygon primitive is an exception in OpenGL where the first vertex of a polygon primitive determines the color of the polygon, even if actually broken * into triangles and/or quads.

* *

See section 2.14.7 (Flatshading) of the OpenGL 2.1 specification, particularly Table 2.12 for more details.

* *

Alternatively the provoking vertex could be the first vertex of the primitive. Other APIs with flat-shading functionality such as Reality Lab and * Direct3D have adopted the "first vertex of the primitive" convention to determine the provoking vertex. However, these APIs lack quads so do not have a * defined provoking vertex convention for quads.

* *

The motivation for this extension is to allow applications developed for APIs with a "first vertex of the primitive" provoking vertex to be easily * converted to OpenGL.

*/ public class EXTProvokingVertex { /** Accepted by the {@code mode} parameter of ProvokingVertexEXT. */ public static final int GL_FIRST_VERTEX_CONVENTION_EXT = 0x8E4D, GL_LAST_VERTEX_CONVENTION_EXT = 0x8E4E; /** Accepted by the {@code pname} parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. */ public static final int GL_PROVOKING_VERTEX_EXT = 0x8E4F, GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = 0x8E4C; static { GL.initialize(); } protected EXTProvokingVertex() { throw new UnsupportedOperationException(); } static boolean isAvailable(GLCapabilities caps) { return checkFunctions( caps.glProvokingVertexEXT ); } // --- [ glProvokingVertexEXT ] --- public static native void glProvokingVertexEXT(@NativeType("GLenum") int mode); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy