#include <iostream>
#include <vector>
#include <GL/glew.h>
int main() {
const int numArrays = 3;
const int arraySize = 5;
std::vector<GLfloat> arrays[numArrays];
// Populate arrays with data
for (int i = 0; i < numArrays; ++i) {
for (int j = 0; j < arraySize; ++j) {
arrays[i].push_back(static_cast<GLfloat>(i * arraySize + j));
}
}
// Convert vectors to arrays for GLSL
GLfloat* glslArrays[numArrays];
for (int i = 0; i < numArrays; ++i) {
glslArrays[i] = arrays[i].data();
}
// Example usage of the GLSL arrays
for (int i = 0; i < numArrays; ++i) {
std::cout << "Array " << i << " values: ";
for (int j = 0; j < arraySize; ++j) {
std::cout << glslArrays[i][j] << " ";
}
std::cout << std::endl;
}
return 0;
}