Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class ARBTransformFeedback2

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

Native bindings to the ARB_transform_feedback2 extension.

The EXT_transform_feedback extension allows applications to capture primitives to one or more buffer objects when transformed by the GL. This extension provides a few additional capabilities to these extensions, making transform feedback mode more useful.

First, it provides transform feedback objects which encapsulate transform feedback-related state, allowing applications to replace the entire transform feedback configuration in a single bind call. Second, it provides the ability to pause and resume transform feedback operations. When transform feedback is paused, applications may render without transform feedback or may use transform feedback with different state and a different transform feedback object. When transform feedback is resumed, additional primitives are captured and appended to previously captured primitives for the object.

Additionally, this extension provides the ability to draw primitives captured in transform feedback mode without querying the captured primitive count. The command DrawTransformFeedback is equivalent to glDrawArrays(<mode>, 0, <count>), where count is the number of vertices captured to buffer objects during the last transform feedback capture operation on the transform feedback object used. This draw operation only provides a vertex count -- it does not automatically set up vertex array state or vertex buffer object bindings, which must be done separately by the application.

Requires GL20 or ARB_shader_objects and NV_transform_feedback or EXT_transform_feedback. Promoted to core in OpenGL 4.0.

Field Summary

Modifier and TypeField and Description
public static final int
GL_TRANSFORM_FEEDBACK

Accepted by the target parameter of BindTransformFeedback.

public static final int
GL_TRANSFORM_FEEDBACK_BINDING

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

public static final int
GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE

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

public static final int
GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED

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

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
glBindTransformFeedback(int
the target to which to bind the transform feedback object id. Must be:
TRANSFORM_FEEDBACK
target
,
int
the name of a transform feedback object
id
)

Binds a transform feedback object.

public static void
glDeleteTransformFeedbacks(IntBuffer
an array of names of transform feedback objects to delete
ids
)

Deletes transform feedback objects.

public static void
glDeleteTransformFeedbacks(int id)

Deletes transform feedback objects.

public static void
public static void
glDrawTransformFeedback(int mode, int
the name of a transform feedback object from which to retrieve a primitive count
id
)

Render primitives using a count derived from a transform feedback object.

public static void
glGenTransformFeedbacks(IntBuffer
an array of into which the reserved names will be written
ids
)

Reserves transform feedback object names.

public static int
glGenTransformFeedbacks()

Reserves transform feedback object names.

public static void
glGenTransformFeedbacks(int[] ids)

Array version of: GenTransformFeedbacks

public static boolean
glIsTransformFeedback(int
a value that may be the name of a transform feedback object
id
)

Determines if a name corresponds to a transform feedback object.

public static void
glPauseTransformFeedback()

Pauses transform feedback operations for the currently bound transform feedback object.

public static void
glResumeTransformFeedback()

Resumes transform feedback operations for the currently bound transform feedback object.

public static void
nglDeleteTransformFeedbacks(int
the number of transform feedback objects to delete
n
,
long ids)

Unsafe version of: DeleteTransformFeedbacks

public static void
nglGenTransformFeedbacks(int
the number of transform feedback object names to reserve
n
,
long ids)

Unsafe version of: GenTransformFeedbacks

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_TRANSFORM_FEEDBACKback to summary
public static final int GL_TRANSFORM_FEEDBACK

Accepted by the target parameter of BindTransformFeedback.

GL_TRANSFORM_FEEDBACK_BINDINGback to summary
public static final int GL_TRANSFORM_FEEDBACK_BINDING

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

GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVEback to summary
public static final int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE

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

GL_TRANSFORM_FEEDBACK_BUFFER_PAUSEDback to summary
public static final int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED

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

Constructor Detail

ARBTransformFeedback2back to summary
protected ARBTransformFeedback2()

Method Detail

glBindTransformFeedbackback to summary
public static void glBindTransformFeedback(int target, int id)

Binds a transform feedback object.

Parameters
target:int

the target to which to bind the transform feedback object id. Must be:

TRANSFORM_FEEDBACK
id:int

the name of a transform feedback object

glDeleteTransformFeedbacksback to summary
public static void glDeleteTransformFeedbacks(IntBuffer ids)

Deletes transform feedback objects.

Parameters
ids:IntBuffer

an array of names of transform feedback objects to delete

glDeleteTransformFeedbacksback to summary
public static void glDeleteTransformFeedbacks(int id)

Deletes transform feedback objects.

glDeleteTransformFeedbacksback to summary
public static void glDeleteTransformFeedbacks(int[] ids)

Array version of: DeleteTransformFeedbacks

glDrawTransformFeedbackback to summary
public static void glDrawTransformFeedback(int mode, int id)

Render primitives using a count derived from a transform feedback object.

Parameters
mode:int

what kind of primitives to render. One of:

POINTSLINE_STRIPLINE_LOOPLINESTRIANGLE_STRIPTRIANGLE_FANTRIANGLES
LINES_ADJACENCYLINE_STRIP_ADJACENCYTRIANGLES_ADJACENCYTRIANGLE_STRIP_ADJACENCYPATCHESPOLYGONQUADS
QUAD_STRIP
id:int

the name of a transform feedback object from which to retrieve a primitive count

glGenTransformFeedbacksback to summary
public static void glGenTransformFeedbacks(IntBuffer ids)

Reserves transform feedback object names.

Parameters
ids:IntBuffer

an array of into which the reserved names will be written

glGenTransformFeedbacksback to summary
public static int glGenTransformFeedbacks()

Reserves transform feedback object names.

Annotations
@NativeType:void
glGenTransformFeedbacksback to summary
public static void glGenTransformFeedbacks(int[] ids)

Array version of: GenTransformFeedbacks

glIsTransformFeedbackback to summary
public static boolean glIsTransformFeedback(int id)

Determines if a name corresponds to a transform feedback object.

Parameters
id:int

a value that may be the name of a transform feedback object

Annotations
@NativeType:GLboolean
glPauseTransformFeedbackback to summary
public static void glPauseTransformFeedback()

Pauses transform feedback operations for the currently bound transform feedback object.

When transform feedback operations are paused, transform feedback is still considered active and changing most transform feedback state related to the object results in an error. However, a new transform feedback object may be bound while transform feedback is paused. The error INVALID_OPERATION is generated by PauseTransformFeedback if the currently bound transform feedback is not active or is paused.

When transform feedback is active and not paused, all geometric primitives generated must be compatible with the value of primitiveMode passed to BeginTransformFeedback. The error INVALID_OPERATION is generated by Begin or any operation that implicitly calls Begin (such as DrawElements) if mode is not one of the allowed modes. If a geometry shader is active, its output primitive type is used instead of the mode parameter passed to Begin for the purposes of this error check. Any primitive type may be used while transform feedback is paused.

glResumeTransformFeedbackback to summary
public static void glResumeTransformFeedback()

Resumes transform feedback operations for the currently bound transform feedback object.

The error INVALID_OPERATION is generated by ResumeTransformFeedback if the currently bound transform feedback is not active or is not paused.

nglDeleteTransformFeedbacksback to summary
public static void nglDeleteTransformFeedbacks(int n, long ids)

Unsafe version of: DeleteTransformFeedbacks

Parameters
n:int

the number of transform feedback objects to delete

nglGenTransformFeedbacksback to summary
public static void nglGenTransformFeedbacks(int n, long ids)

Unsafe version of: GenTransformFeedbacks

Parameters
n:int

the number of transform feedback object names to reserve