In C++, I could define a vertex such as
class Vertex
{
public:
Vertex();
~Vertex();
//Position
float x, y, z, w;
//Normals
float nx, ny, nz, nw;
//Textures
float tu, tv;
};
and then create a vertex buffer of an array of the above Vertex objects. I would tell the shader what the offsets for the position, normal, and textures were, and the shader would be able to map the values correctly.
In Java on Android, with OpenGL ES 2.0, I've been able to create individual float arrays for position, normals, and textures, or a single float array for all of them where I specify the offsets, but I haven't found a way to tell the buffer I'm using an array of objects. Is this possible? Or do I need to generate an array of floats myself?