Instead of using a vector of floats, i want to use a struct, so that it can store different types and is easier.
struct QuadVertex
{
glm::vec3 Position;
glm::vec4 Color;
glm::vec2 TexCoord;
int TexIndex;
};
But if i use this structure in a vertex buffer, c++ could use padding or alignment in the structure and openl wouldnt get the expected data. How can i safely use this structure to store vertices, and how should i modify the vertex attributes correctly?