opengl--glmultiDrawElements
我最近在学习opengl,在红宝书上遇到了glmultidrawelements函数,我知道windows系统对opengl高级版本的函数不太支持,去网上搜罗了很多办法,现在出现的状况是添加了glew.h头文件后,glmultidrawelements函数被宏函数的方式调用,但是向其中传入参数时却无法正确识别参数。。。。。这个问题让我很纠结,求高手分析解答!
如下:
static GLubyte indices1[] = {0, 1, 2, 5, 4, 3};//用此索引去索引顶点数组
static GLubyte indices2[] = {2, 3, 5, 4};
static GLsizei count[] = {5, 3};
static GLvoid* indices[2] = {indices1, indices2};
glMultiDrawElements(GL_LINE_STRIP, count, GL_UNSIGNED_BYTE, indices, 2);
错误:
cannot convert parameter 2 from 'int' to 'const GLsizei *
cannot convert parameter 4 from 'GLvoid *[2]' to 'const GLvoid **'
[解决办法]
看下opengl各种数据类型是如何定义的