Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class AMDVertexShaderTessellator

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

Native bindings to the AMD_vertex_shader_tessellator extension.

The vertex shader tessellator gives new flexibility to the shader author to shade at a tessellated vertex, rather than just at a provided vertex.

In unextended vertex shading, the built-in attributes such as gl_Vertex, gl_Normal, and gl_MultiTexcoord0, together with the user defined attributes, are system provided values which are initialized prior to vertex shader invocation.

With vertex shading tessellation, additional vertex shader special values are available:


        ivec3 gl_VertexTriangleIndex; // indices of the three control
                                      // points for the vertex
        vec3 gl_BarycentricCoord;     // barycentric coordinates
                                      // of the vertex

    i o
      |\
      | \
      *--*
      |\ |\
      | \| \
      *--*--*
      |\ |\ |\
      | \| \| \
    j o--*--*--o k

    Figure 1  A Tessellated Triangle
    o = control point (and tessellated vertex)
    * = tessellated vertex

        ivec4 gl_VertexQuadIndex;   // indices for the four control
                                    // points for the vertex
        vec2 gl_UVCoord;            // UV coordinates of the vertex

    i o--*--*--o k
      |\ |\ |\ |
      | \| \| \|
      *--*--*--*
      |\ |\ |\ |
      | \| \| \|
      *--*--*--*
      |\ |\ |\ |
      | \| \| \|
    j o--*--*--o l

    Figure 2  A Tessellated Quad
    o = control point (and tessellated vertex)
    * = tessellated vertex

When this extension is enabled, conventional built-in attributes and user defined attributes are uninitialized. The shader writer is responsible for explicitly fetching all other vertex data either from textures, uniform buffers, or vertex buffers.

The shader writer is further responsible for interpolating the vertex data at the given barycentric coordinates or uv coordinates of the vertex.

Requires OpenGL 2.0.

Field Summary

Modifier and TypeField and Description
public static final int
GL_CONTINUOUS_AMD

Accepted by TessellationModeAMD.

public static final int
GL_DISCRETE_AMD

Accepted by TessellationModeAMD.

public static final int
GL_INT_SAMPLER_BUFFER_AMD

Returned by the type parameter of GetActiveUniform.

public static final int
GL_SAMPLER_BUFFER_AMD

Returned by the type parameter of GetActiveUniform.

public static final int
GL_TESSELLATION_FACTOR_AMD

Accepted by GetFloatv.

public static final int
GL_TESSELLATION_MODE_AMD

Accepted by GetIntegerv.

public static final int
GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD

Returned by the type parameter of GetActiveUniform.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static native void
public static native void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_CONTINUOUS_AMDback to summary
public static final int GL_CONTINUOUS_AMD

Accepted by TessellationModeAMD.

GL_DISCRETE_AMDback to summary
public static final int GL_DISCRETE_AMD

Accepted by TessellationModeAMD.

GL_INT_SAMPLER_BUFFER_AMDback to summary
public static final int GL_INT_SAMPLER_BUFFER_AMD

Returned by the type parameter of GetActiveUniform.

GL_SAMPLER_BUFFER_AMDback to summary
public static final int GL_SAMPLER_BUFFER_AMD

Returned by the type parameter of GetActiveUniform.

GL_TESSELLATION_FACTOR_AMDback to summary
public static final int GL_TESSELLATION_FACTOR_AMD

Accepted by GetFloatv.

GL_TESSELLATION_MODE_AMDback to summary
public static final int GL_TESSELLATION_MODE_AMD

Accepted by GetIntegerv.

GL_UNSIGNED_INT_SAMPLER_BUFFER_AMDback to summary
public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD

Returned by the type parameter of GetActiveUniform.

Constructor Detail

AMDVertexShaderTessellatorback to summary
protected AMDVertexShaderTessellator()

Method Detail

glTessellationFactorAMDback to summary
public static native void glTessellationFactorAMD(float factor)
glTessellationModeAMDback to summary
public static native void glTessellationModeAMD(int mode)