I have OpenGL method :
glStencilFillPathInstancedNV(6, glyphBase,
GL_UNSIGNED_BYTE, "OpenGL",
GL_PATH_FILL_MODE_NV, 0xFF,
GL_TRANSLATE_2D_NV, xtranslate);
Where xtranslate should be an array of GLfloat where each consecutive pair of numbers represent 2 dim vector. In my app the data structure representing xtranslate is:
std::vector<glm::vec2> xtranslate;
How do I get the data pointer to this structure so that it's valid to be passed into the above mentioned method as GLFloat*
Should I manually "flatten" the structure into array or there is some trickier solution?
Glm is the OpenGL template only math library.
Btw , I have seen that OpenSceneGraph API has such a method for its vector structures , but I couldn't find the source for the implementation.