I want to send each face as VBO, and I structured the data as this
facevbo[0] = x x x x x x //x,y,z,r,g,b,s,t
facevbo[1] = x x x x x
facevbo[2] = x x x x x x x
facevbo[3] = x x x x
.
.
.
facevbo[numfaces] = x x x x
Basicly I have dynamic 2d array with different column size:
GLfloat** faceVBO = new GLfloat*[m_numOfFaces];
faceVBO[dfaceIndex] = new GLfloat[pFace->numOfVerts*8];
When I print all the faces, everything is fine, but when im trying to put them to use, i have problem at this line: (ideally I would iterate trough all the faces to bind each face, but lets take the first column)
glBufferData(GL_ARRAY_BUFFER, 4*oindices, faceVBO[0], GL_STATIC_DRAW);
the third parameter (faceVBO[0]) "argument of type GLfloat is incompatible with param. of type const void*"
but if i tead from array, like
GLfloat facevbo[] = {x,x,x,x...}
and
glBufferData(GL_ARRAY_BUFFER, 4*oindices, faceVBO, GL_STATIC_DRAW);
it works OK. How should i send the data in this case?
Thanks