Here’s some pseudo code to give a rough idea of what I wanna do
typedef struct _POINT { uint color; uint place; uint texel; } POINT;
vec4 colors[3] = {{0}};
vec3 places[3] = {{0}};
vec2 texels[3] = {{0}};
POINT points[3] = {{0}};
// shader location, address, offset of member, stride to next index, size of array from address
attr( location, points, offsetof(POINT,color), sizeof(POINT), sizeof(points) );
buff( ..., colors, ... );
attr( location, points, offsetof(POINT,place), sizeof(POINT), sizeof(points) );
buff( ..., places, ... );
attr( location, points, offsetof(POINT,texel), sizeof(POINT), sizeof(points) );
buff( ..., texels, ... );
How would I go about doing that in OpenGL? For whatever example you give save future viewers of the thread some confusion by just using the exact same pseudo structure as above. Can also skip how to get the location though just in case there’s some deviation from what I’ve been using I’d like you to give a rough example of setting up the buffers before the render loop also.