# glLoadName() to process hits on vertex arrays?

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

## 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.