View Full Version : Drawing a plant stem
11-01-2004, 04:58 AM
Im trying to draw a curved stem but when i use GL_POLYGON it doesnt do the left hand side of the curve.If i use GL_LINE_LOOP it does the curve but i need the stem to be fully colored. Any ideas?
11-01-2004, 05:12 AM
You don't give much detail, but my guess is that you are trying to use GL_POLYGON to draw a single concave polygon. You can only draw convex polygons with GL_POLYGON. Try breaking it up into multiple convex polygons.
11-01-2004, 05:43 AM
If i use GL_LINE_LOOP is there any way of filling in the shape afterwards.
11-02-2004, 04:36 AM
You mean is there something like glFloodFill()? I'm afraid not. You could probably do your own flood fill routine to use in a texture or to use in glDrawPixels, but it probably isn't a very good way of doing it. Depending on what exactly your stem looks like, I would think you could break it up into a quad strip fairly easily. Is it just a stem, or does it also have branches?
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.