Jump to content
  • Advertisement
Sign in to follow this  

glLoadName() to process hits on vertex arrays?

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

Hey all, I have a wire frame mesh and I'm trying to have each element of my mesh highlighted by hovering the mouse over that triangle. I think my problem is that I'm using vertex arrays. I set the vertex arrays up just as soon as my application reads in an input file, parses the coord values, and loads them into vertex arrays. As I understand it, I need to call glLoadName(int) for each triangle while on the MODELVIEW matrix during render mode SELECT so that I can process the hits. But I don't know how since all my triangles are vertex arrays where I then make a call like the following (jogl/java code) to draw them.
gl.glVertexPointer(3, GL.GL_FLOAT, 0, vElementsBuffer[index]);
gl.glDrawArrays(GL.GL_TRIANGLES, 0, vElementsBuffer[index].capacity() / 3);
I hope that made sense, if not, I'll try to explain more. Any help much appreciated.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!