View Full Version : Combine Nurbs and straight lines

09-09-2009, 04:41 PM
Hello all,

This may have been answered in another thread, and if so I would greatly appreciate being pointed to the correct one.

I am trying to create a filled polygon that combines both straight edges and curved edges. The curved edges are described using Bezier control points. An example polygon would have 6 sides with the third and fifth sides being curved and the rest being straight.

I can generate the outline of the object easily enough using a combination of GL_LINES and gluNurbsCurve for the straight and curved edges respectively ( I have also seen that I can generate each of the sides as a Nurb with straight edges only having two control points ). My problem is that I would like to have the polygon filled in with a specific color and I do not know how to combine the curved edges and the straight edges into one object (i.e GL_POLYGON).

If anyone has any suggestions on how to tackle this problem, I would greatly appreciate it.