hope you'll help me to understand. I have a class, that defines a buffer:
typedef std::variant<signed char, unsigned char, short, unsigned short, int, unsigned int, float> BufferData;
struct BufferAttribute {
unsigned int index;
int size = 4;
char format = ATTRIBUTE_FORMAT::FLOAT;
bool normalized = false;
int stride = 0;
int offset = 0;
std::vector<BufferData> data;
std::string name;
};
As you can see, I have a char that defines a format, so in the future, I will know the exact data format. But as for the data, I'm using a variant which makes me worry about the performance of the visitor. What type can I use to make it faster or better? Or do you think that Variant is a good choice?
P.S. I worrying about processing thousands of numbers from this buffer in real-time in my game app.