Q: How to draw an arrow?

Hi,

Surely I can draw an arrow by drawing one line plus two very tiny short lines. Is there a better way than this naive method? Thanks.

Tony

I don’t think there is a gl function help you to draw an arrow
Using 3 GL_LINES is not a stupid method. If u code in C++, u could create a arrow class.

Another option is to create a texture with an arrow in it and draw a triangle. Other than this and the 3-line method, I dont really see much else you can do

If you use GL_LINES, you’ll get a very thin arrow for 1 pixel width and very round ends for more than 1 pixel I think. I think to build it out of tris will look the best.

Thanks for all the replies. You’ve been very helpful.

Regards.

Tony

If you wanted to get particularily tricky, you could draw a Line, and then draw a pretty Cone or pyramid on the end of that.

I guess its not that tricky compared to everything that you can do with OpenGL, but for arrow drawing, its pretty tricky :slight_smile:

Thats one of the really neat things I think, being able to do so much with a simple concept like arrow drawing.