I’d like to use attributes to send other parameters than the more current one (normal, color, positions…) to send datas for a geometry shader. ex : Id like the give an info about velocity that could be different for each vertex.
So I’d like to used openGL the ways it is meant to be used in openGL 3 (my mac supports GL 2.1). I read the web page of openGL tutorial.
By reading the OF documentation, I found these usefull things to send custom attributes.
My question is :
What does the “int location” and “GLint location” refers to
vbo.setAttributeData(int location, const float *vert0x, int numCoords, int total, int usage);
shader.setAttribute1d(GLint location, double v1);
Normally, each type of attribute are stored in a GL buffer, and I can manipulate them using their buffer ID. if “location” refers to the bufferID, how can I have access to it knowing that ofVbo is a collection of the buffers I will use?
I didn’t found a method to get the specific buffer in the ofVbo Object.
Hope I’m clear enough
I know that ofvbo is not so documented because it is meant to be used by people who have experience with openGL. But it makes things hard for those who have little knolage about it and what to do something with it.
The last OSX on a 2 years old computer.
I’ve just made a test, apparently its GL 4.something.
Curiously, last year I made a test in order to use an addon, and OF warned me I was limited to GL 2.1. Since this day I do everything in GL2.1.
I’ll try what you’ve told me concerning the use of attributes. I’ll see if it works.
Thanks a lot !
By the way, most of my posts concerns parts of the documentation that are not very documented, or subjets that might interess many beginners in GL and DSP. I wish I could improve them myself but I do not feel experimented enought to pretend having the best methodology.
Is there something that the “OF team” can do about it ?
there’s a lot of effort put in making the docs better but it’s really a lot of work and it never seems complete. the best is to look at the examples or search the forum and if you can’t find the exact thing don’t be afraid to ask.
also if you think you have understood some part any contribution to the docs is always welcome