Jump to content
  • Advertisement

Archived

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

M4X

Trouble with glDrawArrays

This topic is 5832 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

I never could figure out why glDrawArrays dont works when i pass a non-zero value to the "First" parameter, insead i am using something like: glBegin(GL_); for(UINT i = 0; i < NumVertices; ++i) { glArrayElement(FirstIndex+i); } glEnd(); that works fine, and if i insead use glDrawArrays(GL_, FirstIndex, NumVertices), i get some kindof "polygon soap" when rendering with a non-zero "First" parameter, i has ben tested the program into several machines and the problems still appears, so i dont know what can be the problem. If someone know why it could be happening, yeah, it works if i use the glArrayElement but.. well, i cant live without know why the glDrawArrays dont works, please tell me if you know something that can help me to figure out. Well, sorry for my english, i''m from Argentina Byez!

Share this post


Link to post
Share on other sites
Advertisement
I could imagine some evil Hack: just tell OpenGL to start with element 0 but give it an modified pointer (so use (pPointer + (nTriangleSizeInBytes * nStartWithElement)))

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!