On Tue, Dec 15, 2009 at 3:22 PM, Simen kjaeraas <[email protected]> wrote: > Bill Baxter <[email protected]> wrote: > >> Biggest problem with OpenGL is that the quality is crap for 2D stuff, >> and quality really matters when you're trying to do something like >> draw 2000 little markers on a plot and each is only 5 pixels wide. >> >> Best you can do right now with GL without a lot of contortions is >> something like 16x oversampling, but that only works on fairly recent >> / high-end cards (no chance on an intel integrated chipset, for >> instance). With analytical antialiasing you get 256 levels (vs just >> 16 with hardware AA). The quality difference is very noticeable, >> especially on plots with lots of fine lines and tiny markers. > > You might get away with generating textures at 2-4 times the wanted > resolution, and generate mipmaps for the texture, then read from the > mipmap. Somewhat of a roundabout way of getting the image, but unless > you're using huge textures, it should work. (And even if you're using > huge textures, you can split the job. )
Yes, those are the kind of contortions I was talking about. Or you could do N passes, do a sub-pixel jitter of the camera each pass, and accumulate. Then you can essentially get whatever quality you want if you're patient enough. Or you could just use a library written for doing anti-aliased 2D graphics. Best justification for using OpenGL, in my opinion, is in order to facilitate support of 3D plotting at some point in the future. That seems to be difficult to retro-fit once you've gone deep down the 2D rabbit hole. At least Matplotlib (based on AGG) seems to be having trouble getting anywhere with 3D plots. --bb
