<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="jit.gl.tf" module="" category="">
	<digest>
		Manage transform feedback on geometric meshes
	</digest>
	<description>
		The <o>jit.gl.tf</o> object binds to a <o>jit.gl.mesh</o> object, takes input from <o>jit.gl.buffer</o> objects, and uses a shader program defined in a <o>jit.gl.shader</o> object to apply a transform feedback effect on the mesh geometry.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			glcore
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				messages to this 3d object and jit.gl.buffer input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				jit.gl.buffer input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				connect to jit.gl.mesh object to bind
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<objarglist>
		<objarg name="numbuffers" default="1" type="int">
			<digest>
				Number of Buffer Inlets
			</digest>
			<description>
				The number of inlets to create. Each inlet can bind to a <o>jit.gl.buffer</o>. The maximum is 8, although the actual maximum number of feedback buffers is hardware dependent, usually 4.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="jit_gl_buffer">
			<arglist />
			<digest>
				Binds the named <o>jit.gl.buffer</o> object to the inlet.
			</digest>
			<description>
				Binds the named <o>jit.gl.buffer</o> object to the inlet. Note that the incoming buffer must have the <at>outname</at> attribute set in order to reference it in the corresponding <o>jit.gl.shader</o>. The jit.gl.buffer object outlet is pre-formatted with this message prefix, so connecting them automatically binds the incoming buffer.
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="importattrs" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="bufnames" get="1" set="1" type="symbol" size="8">
			<digest>
				Buffer Object Name List
			</digest>
			<description>
				Currently read only. Displays the list of buffers bound to the <o>jit.gl.tf</o> object. Order of buffers reflects bound inlets from left to right.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Buffer Object Name List" />
			</attributelist>
		</attribute>
		<attribute name="enable" get="1" set="1" type="int" size="1">
			<digest>
				Enable Transform Feedback
			</digest>
			<description>
				Enables transform feedback when set to 1. When disabled, the bound input buffer is passed in its intial state.
				<br />
				<br />
				It is recommended to disable this before modifying input buffers and reenable it after making changes. Changing input buffer state while enabled may result in unexpected behavior.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Enable Transform Feedback" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="initcount" get="1" set="1" type="int" size="1">
			<digest>
				Initial Primitive Count
			</digest>
			<description>
				The initial number of primitives that will be passed to the transform feedback stage. Useful for particle simulations when used in conjunction with geometry shaders to create emitters. If set to 0, the entire buffer is passed on enable.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Initial Primitive Count" />
			</attributelist>
		</attribute>
		<attribute name="name" get="1" set="0" type="symbol" size="1">
			<digest>
				Name of tf instance for internal use
			</digest>
			<description>
				The read only name of the <o>jit.gl.tf</o> object. This name is used internally to handle the feedback bindings.
			</description>
		</attribute>
		<attribute name="numbuffers" get="1" set="0" type="int" size="1">
			<digest>
				Number of buffers
			</digest>
			<description>
				Set as an argument after the jit.gl.tf object name, reports the number of buffer inlets.
			</description>
		</attribute>
		<attribute name="shader" get="1" set="1" type="symbol" size="1">
			<digest>
				Shader Object Name
			</digest>
			<description>
				The name of the <o>jit.gl.shader</o> object for the <o>jit.gl.tf</o> object to bind to.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Shader Object Name" />
			</attributelist>
		</attribute>
		<attribute name="texture" get="1" set="1" type="symbol" size="32">
			<digest>
				Texture Names
			</digest>
			<description>
				The name of the texture or textures bound to the transform feedback shader process (default = none).
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Texture" />
			</attributelist>
		</attribute>		
	</attributelist>
	<jitterattributelist />
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.gl.buffer" />
		<seealso name="jit.gl.mesh" />
		<seealso name="jit.gl.shader" />
	</seealsolist>
	<discussion>
		Transform feedback allows for computations on geometric data buffers to take place entirely on the GPU without the need to readback to the CPU, and are commonly used to create GPU particle systems. The buffer data is read in by the transform feedback shader, operated on, and the results are passed on to the <o>jit.gl.mesh</o> for rendering. These results are then fed back to the tranform feedback object as input for the next frame, thereby maintaining state between subsequent frames.
	</discussion>
</c74object>
