-
Junior Member
Regular Contributor
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
-
Re: Q: How to draw an arrow?
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.
-
Member
Regular Contributor
Re: Q: How to draw an arrow?
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
-
Re: Q: How to draw an arrow?
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.
-
Junior Member
Regular Contributor
Re: Q: How to draw an arrow?
Thanks for all the replies. You've been very helpful.
Regards.
Tony
-
Re: Q: How to draw an arrow?
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 
Thats one of the really neat things I think, being able to do so much with a simple concept like arrow drawing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules