# Lacking documentation?!

**URL:** <https://discourse.libcinder.org/t/lacking-documentation/796>\
**Category:** Using Cinder\
**Created:** [July 20, 2017, 8:35am UTC](https://discourse.libcinder.org/t/lacking-documentation/796 "2017-07-20T08:35:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nitin\_Patel](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/nitin_patel/32/415_2.png) [@Nitin\_Patel](https://discourse.libcinder.org/u/Nitin_Patel)\
**Post date:** [July 20, 2017, 8:35am UTC](https://discourse.libcinder.org/t/lacking-documentation/796/1 "2017-07-20T08:35:12Z")

</div>

this is a part of “ParticleSphereGpu” Sample

> mUpdateProg = gl::GlslProg::create(gl::GlslProg::Format().vertex(loadAsset(“particleUpdate.vs”))  
> .feedbackFormat(GL\_INTERLEAVED\_ATTRIBS)  
> .feedbackVaryings({ “position”, “pposition”, “home”, “base”, “colorActive”, “colorInactive”, “color”, “damping” })  
> .attribLocation(“iPosition”, 0)  
> .attribLocation(“iColor”, 1)  
> .attribLocation(“iOColor”, 2)  
> .attribLocation(“iPPosition”, 3)  
> .attribLocation(“iHome”, 4)  
> .attribLocation(“iBase”, 5)  
> .attribLocation(“iDamping”, 6)  
> );

in this sample there is a use of “feedbackFormat( )” and “feedbackVarying( )”. which I am not able to find in the documentation. though I am able to understand what they do. I wonder why are they absent from the documentation?!!

---

<div class="post-metadata">

**Author:** ![paul.houx](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/paul.houx/32/31_2.png) [@paul.houx](https://discourse.libcinder.org/u/paul.houx)\
**Post date:** [July 20, 2017, 10:24am UTC](https://discourse.libcinder.org/t/lacking-documentation/796/2 "2017-07-20T10:24:38Z")

</div>

What existing documentation are you referring to?

In any case, they are part of the initialization of a [transform feedback](https://open.gl/feedback) shader. See also [this sample](https://github.com/cinder/Cinder/blob/master/samples/_opengl/TransformFeedbackSmokeParticles/src/TransformFeedbackSmokeParticlesApp.cpp).

-Paul

---

<div class="post-metadata">

**Author:** ![Nitin\_Patel](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/nitin_patel/32/415_2.png) [@Nitin\_Patel](https://discourse.libcinder.org/u/Nitin_Patel)\
**Post date:** [July 20, 2017, 10:50am UTC](https://discourse.libcinder.org/t/lacking-documentation/796/3 "2017-07-20T10:50:01Z")

</div>

I am looking at [https://libcinder.org/docs/structcinder\_1\_1gl\_1\_1\_glsl\_prog\_1\_1\_format.html](https://libcinder.org/docs/structcinder_1_1gl_1_1_glsl_prog_1_1_format.html). I can find attribLocation( ) as a member function of “Format” class. but there is no mention of feedbackFormat( ) or FeedbackVarying( ) in the member functions. May be I am looking in the wrong place or not understanding some concept here.

---

<div class="post-metadata">

**Author:** ![paul.houx](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/paul.houx/32/31_2.png) [@paul.houx](https://discourse.libcinder.org/u/paul.houx)\
**Post date:** [July 20, 2017, 6:14pm UTC](https://discourse.libcinder.org/t/lacking-documentation/796/4 "2017-07-20T18:14:10Z")

</div>

If I am correct, the documentation is generated from the source, but the process runs manually instead of automatically. It could be that it hasn’t been fully updated yet. It could also be that the script that generates the documentation does not define the `CINDER_GL_HAS_TRANSFORM_FEEDBACK` macro, thereby skipping the transform feedback members.

For the time being, you could take a look at the [source](https://github.com/cinder/Cinder/blob/master/include/cinder/gl/GlslProg.h) instead of the documentation.

---

<div class="post-metadata">

**Author:** ![Nitin\_Patel](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/nitin_patel/32/415_2.png) [@Nitin\_Patel](https://discourse.libcinder.org/u/Nitin_Patel)\
**Post date:** [July 21, 2017, 3:16am UTC](https://discourse.libcinder.org/t/lacking-documentation/796/5 "2017-07-21T03:16:55Z")

</div>

Thanks Paul for taking out your time to explain. I guess the more I  
practice the more I will get clarity about workings of open.

---

<div class="post-metadata">

**Author:** ![Nitin\_Patel](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/nitin_patel/32/415_2.png) [@Nitin\_Patel](https://discourse.libcinder.org/u/Nitin_Patel)\
**Post date:** [July 21, 2017, 3:32am UTC](https://discourse.libcinder.org/t/lacking-documentation/796/6 "2017-07-21T03:32:28Z")

</div>

Yes I found it in the source. Thanks Paul for taking out your time to  
explain.

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://discourse.libcinder.org/u/dave)\
**Post date:** [August 20, 2017, 10:26pm UTC](https://discourse.libcinder.org/t/lacking-documentation/796/7 "2017-08-20T22:26:58Z")

</div>

I have a question on a similar topic. I was playing around with the TransformFeedbackSmokeParticles sample. Adding another buffer to store current particle colour was straight forward, but adding another one (5th - particle size (for gl\_PointSize)) turned out not to work out. All buffers are stored separately thus using GL\_SEPARATE\_ATTRIBS.

When using 1, 2, 3 or 4 varyings, everything works, is there a limit I am facing at this point? Even if you name 3 varyings and leave the 4th empty, compiler throws an error, but when adding one extra (3 + two empty) the compiler will not throw an exception, but the end result will not be good.

**Quick edit:**  
Gave it a go with a single buffer solution from a particle sphere gpu sample and it worked like a charm. It is a solution, but would still want to understand if there is a limit when using SEPARATE\_ATTRIBS.

---

<div class="post-metadata">

**Author:** ![seph](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@seph](https://discourse.libcinder.org/u/seph)\
**Post date:** [August 21, 2017, 9:38am UTC](https://discourse.libcinder.org/t/lacking-documentation/796/8 "2017-08-21T09:38:25Z")

</div>

Hi,

there is a GL\_MAX\_TRANSFORM\_FEEDBACK\_SEPARATE\_ATTRIBS that defines the maximum attribute number supported. According to the [documentation](https://www.khronos.org/opengl/wiki/Transform_Feedback), it should be at least 4.

you could use

```
GLint val;
glGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, &val);

```

to check. But I assume on a lot hardwares it should be just 4.

---

<div class="post-metadata">

**Author:** ![dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@dave](https://discourse.libcinder.org/u/dave)\
**Post date:** [August 21, 2017, 10:02am UTC](https://discourse.libcinder.org/t/lacking-documentation/796/9 "2017-08-21T10:02:28Z")

</div>

That was it.  
Thank you!
