HI, I need a vector such that every elemet is an array of 4 elements; I try this....but I don't sure it works....but then must use in setLight
std::vector <GLfloat>position[4];
position->push_back(1);
position[0][0] = 0.0f;
position[0][1] = 1.0f;
position[0][2] = 2.0f;
position[0][3] = 0.0f;
glLightfv(GL_LIGHT0, GL_POSITION, position[0]); //this don't compile
std::vector <GLfloat>position[4];
position->push_back(1);
position[0][0] = 0.0f;
position[0][1] = 1.0f;
position[0][2] = 2.0f;
position[0][3] = 0.0f;
glLightfv(GL_LIGHT0, GL_POSITION, position[0]); //this don't compile
To copy to clipboard, switch view to plain text mode
Bookmarks