GLAPI/glBindTransformFeedback: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
m fixed sort key
m Bot: Adding better formatting.
 
(5 intermediate revisions by the same user not shown)
Line 9: Line 9:
== Function Definition ==
== Function Definition ==


   void '''glBindTransformFeedback'''(GLenum ''target'', GLuint ''id'');
   void '''glBindTransformFeedback'''(GLenum {{param|target}}, GLuint {{param|id}});


; target
; target
: Specifies the target to which to bind the transform feedback object ''id''. ''target'' must be {{code|GL_TRANSFORM_FEEDBACK}}.
: Specifies the target to which to bind the transform feedback object {{param|id}}. {{param|target}} must be {{enum|GL_TRANSFORM_FEEDBACK}}.
; id
; id
: Specifies the name of a transform feedback object reserved by [[GLAPI/glGenTransformFeedbacks|glGenTransformFeedbacks]].
: Specifies the name of a transform feedback object reserved by {{apifunc|glGenTransformFeedbacks}}.


== Description ==
== Description ==


'''glBindTransformFeedback''' binds the transform feedback object with name ''id'' to the current GL state. ''id'' must be a name previously returned from a call to [[GLAPI/glGenTransformFeedbacks|glGenTransformFeedbacks]]. If ''id'' has not previously been bound, a new transform feedback object with name ''id'' and initialized with with the default transform state vector is created.
'''glBindTransformFeedback''' binds the transform feedback object with name {{param|id}} to the current GL state. {{param|id}} must be a name previously returned from a call to {{apifunc|glGenTransformFeedbacks}}. If {{param|id}} has not previously been bound, a new transform feedback object with name {{param|id}} and initialized with with the default transform state vector is created.


In the initial state, a default transform feedback object is bound and treated as a transform feedback object with a name of zero. If the name zero is subsequently bound, the default transform feedback object is again bound to the GL state.
In the initial state, a default transform feedback object is bound and treated as a transform feedback object with a name of zero. If the name zero is subsequently bound, the default transform feedback object is again bound to the GL state.
Line 26: Line 26:
== Errors ==
== Errors ==


{{code|GL_INVALID_ENUM}} is generated if ''target'' is not {{code|GL_TRANSFORM_FEEDBACK}}.
{{enum|GL_INVALID_ENUM}} is generated if {{param|target}} is not {{enum|GL_TRANSFORM_FEEDBACK}}.


{{code|GL_INVALID_OPERATION}} is generated if the transform feedback operation is active on the currently bound transform feedback object, and that operation is not paused.
{{enum|GL_INVALID_OPERATION}} is generated if the transform feedback operation is active on the currently bound transform feedback object, and that operation is not paused.


{{code|GL_INVALID_OPERATION}} is generated if ''id'' is not zero or the name of a transform feedback object returned from a previous call to [[GLAPI/glGenTransformFeedbacks|glGenTransformFeedbacks]], or if such a name has been deleted by [[GLAPI/glDeleteTransformFeedbacks|glDeleteTransformFeedbacks]].
{{enum|GL_INVALID_OPERATION}} is generated if {{param|id}} is not zero or the name of a transform feedback object returned from a previous call to {{apifunc|glGenTransformFeedbacks}}, or if such a name has been deleted by {{apifunc|glDeleteTransformFeedbacks}}.


== Associated Gets ==
== Associated Gets ==


[[GLAPI/glGet|glGet]] with argument {{code|GL_TRANSFORM_FEEDBACK_BINDING}}
{{apifunc|glGet}} with argument {{enum|GL_TRANSFORM_FEEDBACK_BINDING}}


== See Also ==
== See Also ==


[[GLAPI/glGenTransformFeedbacks|glGenTransformFeedbacks]], [[GLAPI/glDeleteTransformFeedbacks|glDeleteTransformFeedbacks]], [[GLAPI/glIsTransformFeedback|glIsTransformFeedback]], [[GLAPI/glBeginTransformFeedback|glBeginTransformFeedback]], [[GLAPI/glPauseTransformFeedback|glPauseTransformFeedback]], [[GLAPI/glResumeTransformFeedback|glResumeTransformFeedback]], [[GLAPI/glEndTransformFeedback|glEndTransformFeedback]]
{{apifunc|glGenTransformFeedbacks}}, {{apifunc|glDeleteTransformFeedbacks}}, {{apifunc|glIsTransformFeedback}}, {{apifunc|glBeginTransformFeedback}}, {{apifunc|glPauseTransformFeedback}}, {{apifunc|glResumeTransformFeedback}}


== Copyright ==
== Copyright ==
Line 44: Line 44:
Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. [http://opencontent.org/openpub/ http://opencontent.org/openpub/].
Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. [http://opencontent.org/openpub/ http://opencontent.org/openpub/].


[[Category:API Reference 4|BindTransformFeedback]]
[[Category:Core API Ref Transform Feedback|BindTransformFeedback]]
[[Category:Core API Reference|BindTransformFeedback]]

Latest revision as of 19:30, 27 September 2012

glBindTransformFeedback
Core in version 4.6
Core since version 4.0
Core ARB extension ARB_transform_feedback2

glBindTransformFeedback: bind a transform feedback object

Function Definition

 void glBindTransformFeedback(GLenum target​, GLuint id​);
target
Specifies the target to which to bind the transform feedback object id​. target​ must be GL_TRANSFORM_FEEDBACK.
id
Specifies the name of a transform feedback object reserved by glGenTransformFeedbacks.

Description

glBindTransformFeedback binds the transform feedback object with name id​ to the current GL state. id​ must be a name previously returned from a call to glGenTransformFeedbacks. If id​ has not previously been bound, a new transform feedback object with name id​ and initialized with with the default transform state vector is created.

In the initial state, a default transform feedback object is bound and treated as a transform feedback object with a name of zero. If the name zero is subsequently bound, the default transform feedback object is again bound to the GL state.

While a transform feedback buffer object is bound, GL operations on the target to which it is bound affect the bound transform feedback object, and queries of the target to which a transform feedback object is bound return state from the bound object. When buffer objects are bound for transform feedback, they are attached to the currently bound transform feedback object. Buffer objects are used for trans- form feedback only if they are attached to the currently bound transform feedback object.

Errors

GL_INVALID_ENUM is generated if target​ is not GL_TRANSFORM_FEEDBACK.

GL_INVALID_OPERATION is generated if the transform feedback operation is active on the currently bound transform feedback object, and that operation is not paused.

GL_INVALID_OPERATION is generated if id​ is not zero or the name of a transform feedback object returned from a previous call to glGenTransformFeedbacks, or if such a name has been deleted by glDeleteTransformFeedbacks.

Associated Gets

glGet with argument GL_TRANSFORM_FEEDBACK_BINDING

See Also

glGenTransformFeedbacks, glDeleteTransformFeedbacks, glIsTransformFeedback, glBeginTransformFeedback, glPauseTransformFeedback, glResumeTransformFeedback

Copyright

Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.