I’ve started a project that will create animated SVG’s (and hopefully SWF’s later on). I’ve decided to use OpenGL to draw things to the program’s canvas (if it worked for Java 2D, it’ll work for me).
Anyways, the program obviously needs to be able to draw lines past the glLineWidth limit of video cards. How would I go about doing this? I’ve thought that maybe I can use GL_QUADS to simulate a thick line, would this be the right idea?
Secondly, I want to implement smooth drawing of primitives. I cant use GL_LINE_SMOOTH because I’m not going to be drawing lines, i’m going to be drawing primitives with GL_QUADS (and circles with GL_TRIANGLE_FAN). Is there any way to do this?
Okay, i’ve done some things to figure out where to draw the line. It uses trigonometry, and thats kinda slow, how would I speed this up?
And I’m still clueless on the antialiasing.
Not sure this is really advanced, but couldn’t drawing a really wide, but still antialiased 2D quad be done by simply drawing four antialiased lines with whatever width the implementation supports, and then a filled quad deflated half that width on top, to fill the interior?
Depending on OpenGL version accessible, another option using 1.3 could be to have a small texture with (only) alpha-value(s), use combine mode, and have that texture act as “edge smoother” (add REPEAT as needed); or if 1.4 is available, perhaps Secondary Color or even Separate Blend Function could work (while drawing the “outline”).
Just some random ideas.