How to cast int to const GLvoid*?

后端 未结 5 1978
不思量自难忘°
不思量自难忘° 2020-12-04 02:01

In my cross platform OpenGL application I want to draw using vertex buffer objects. However I run into problems invoking glDrawRangeElements.

glDrawRangeEle         


        
5条回答
  •  再見小時候
    2020-12-04 02:31

    You could try to call it like this:

    // The first to last vertex is 0 to 3
    // 6 indices will be used to render the 2 triangles. This make our quad.
    // The last parameter is the start address in the IBO => zero
    
    glDrawRangeElements(GL_TRIANGLES, 0, 3, 6, GL_UNSIGNED_SHORT, NULL);
    

    Please have a look to OpenGL tutorial.

提交回复
热议问题