Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class ARBProvokingVertex

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

Native bindings to the ARB_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.

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.

Promoted to core in OpenGL 3.2.

Field Summary

Modifier and TypeField and Description
public static final int
GL_FIRST_VERTEX_CONVENTION

Accepted by the mode parameter of ProvokingVertex.

public static final int
GL_LAST_VERTEX_CONVENTION

Accepted by the mode parameter of ProvokingVertex.

public static final int
GL_PROVOKING_VERTEX

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
glProvokingVertex(int
the provoking vertex mode. One of:
FIRST_VERTEX_CONVENTIONLAST_VERTEX_CONVENTION
mode
)

Specifies the vertex to be used as the source of data for flat shaded varyings.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_FIRST_VERTEX_CONVENTIONback to summary
public static final int GL_FIRST_VERTEX_CONVENTION

Accepted by the mode parameter of ProvokingVertex.

GL_LAST_VERTEX_CONVENTIONback to summary
public static final int GL_LAST_VERTEX_CONVENTION

Accepted by the mode parameter of ProvokingVertex.

GL_PROVOKING_VERTEXback to summary
public static final int GL_PROVOKING_VERTEX

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTIONback to summary
public static final int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

Constructor Detail

ARBProvokingVertexback to summary
protected ARBProvokingVertex()

Method Detail

glProvokingVertexback to summary
public static void glProvokingVertex(int mode)

Specifies the vertex to be used as the source of data for flat shaded varyings.

Parameters
mode:int

the provoking vertex mode. One of:

FIRST_VERTEX_CONVENTIONLAST_VERTEX_CONVENTION