OpenGL's flexibility and shader attribute

Hi,

Many people complains abouts openGL’s flexibilité because shaders are limited to four planes. Recently I learned real 2.0 OpenGL and notieced that Shaders attribute of any type can be sent to each vertex or each segment (it is also possible to to it in OF).

So I was wondering why in the GPU example two fbo are used, we could have use one shader with positions and a vec3 attribute for speed and calculate all at once with only one pingPongBuffer. Now ofxopenCL seems not to be so usefull for particle simulations according to me.

Am I right ?

Thanks

Nicolas

not sure what example you mean but perhaps you can send a pull request fixing the issue.

I meant the GPU particle example sorry. This post is not about solving a problem but more a general question I asked myself about GL.

yes i guess it can be done in a more optimized way, if it’s not is probably because the original author didn’t figured it out. that’s why i was saying that if you find a better way to do it, it would be great if you can send a PR doing it that way