Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


questionon glMultiDrawElementsEXT

This topic is 5170 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, A while back someone had suggested to me to use glMultiDrawElementsEXT to draw several traingle strips/fans at once... the prototype I have found is: void glMultiDrawElements( GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount) this is how I _tried_ to use it: GLsizei stripCount=# of triangle strips GLsizei *ssCounts; GLvoid **stripIndexes=array of indices for strips, i.e. stripIndexes[0] is the list of indexes for the 0th triangle strip and it has legnth ssCounts[0] it is created via:
 ssCounts=new GLsizei[stripCount];
 stripIndexes=new GLvoid*[stripCount];

 Gluint *currentStrip;
 ssCounts[i]=NumberOfTriangles in i'th strip
 currentStrip=new GLuint[NumberOfTriangles in i'th strip]
and then the index arrays are filled. the folowing code works fine:
   Gluint *currentStrip;
   glDrawElements(GL_TRIANGLE_STRIP,ssCounts[i],GL_UNSIGNED_INT, stripIndexes[i]);
but this code crashes: glMultiDrawElements(GL_TRIANGLE_STRIP, ssCounts, GL_UNISGNED_INT, (const GLvoid**)stripIndexes,stripCount); any help would be greatly appreciated, I just want the call to glMultiDrawElements to do the same as code of the loop... the only difference between the 2 codes is that the loop is replaced with the call to glMultiDrawElements..... I imagine the driver has that loop anyways there, but probably much better optimized than the compiler would do...

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!