Hi all,
I’m having trouble calling the glMultiDrawElements function, i thought it was my code to start with, but i have since copied and pasted a number of code fragments from the internet and books and found they all produce the same compilation error:
The latest of the copied and pasted codes is as follows:
static GLubyte frontIndices[] = {4, 5, 6, 7};
static GLubyte rightIndices[] = {1, 2, 6, 5};
static GLubyte bottomIndices[] = {0, 1, 5, 4};
static GLubyte backIndices[] = {0, 3, 2, 1};
static GLubyte leftIndices[] = {0, 4, 7, 3};
static GLubyte topIndices[] = {2, 3, 7, 6};
static GLubyte * indices[] = { frontIndices, rightIndices, bottomIndices, backIndices, leftIndices, topIndices };
static GLsizei counts[] = {4, 4, 4, 4, 4, 4 };
glMultiDrawElements(GL_QUADS,counts,GL_UNSIGNED_BYTE,indices,6);
I have no trouble running glDrawElements, but the glMultiDrawElements comes up with the following error every time:
Error 1 error C2664: ‘void (GLenum,const GLsizei *,GLenum,const GLvoid **,GLsizei)’ : cannot convert parameter 4 from ‘GLubyte *[6]’ to ‘const GLvoid **’
and
Error 2 error C2664: ‘void (GLenum,const GLsizei *,GLenum,const GLvoid **,GLsizei)’ : cannot convert parameter 2 from ‘int’ to ‘const GLsizei *’
Can anyone shed some light on this issue?
Thanks very much