View Full Version : Q: How to draw an arrow?
11-28-2000, 10:06 AM
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.
I don't think there is a gl function help you to draw an arrow http://www.opengl.org/discussion_boards/ubb/frown.gif
Using 3 GL_LINES is not a stupid method. If u code in C++, u could create a arrow class.
11-29-2000, 06:10 AM
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
11-29-2000, 07:46 AM
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.
11-29-2000, 03:01 PM
Thanks for all the replies. You've been very helpful.
11-29-2000, 05:25 PM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.