|
From: Mikey <im...@be...> - 2005-08-01 00:46:08
|
I took a shot at getting multisampling working after reading Apple's FSAA technote (http://developer.apple.com/qa/qa2001/qa1268.html) and it turned out to be pretty easy. I added the following lines in gldrawcontext_mac_new() just before the AGL_DOUBLEBUFFER attribute is set: glAttributes[numAttributes++] = AGL_ACCELERATED; glAttributes[numAttributes++] = AGL_NO_RECOVERY; glAttributes[numAttributes++] = AGL_SAMPLES_ARB; glAttributes[numAttributes++] = (GLint)4; glAttributes[numAttributes++] = AGL_SAMPLE_BUFFERS_ARB; glAttributes[numAttributes++] = (GLint)1; Surprisingly, that was all that was necessary despite the fact that the technote stated that you needed to enable it with code such as: glEnable(GL_MULTISAMPLE_ARB); glHint( GL_MULTISAMPLE_FILTER_HINT_NV, GL_NICEST ); As far as I can tell, multisampling is more intensive in both time and memory than the GL_BLEND approach, but the results are quite excellent. The technote also suggests that since multisampling eats up VRAM, it should be something that the user should have control over, so if we were to put this in Quesa, we may want to consider tying it into the quality setting in the TQ3AntiAliasStyleData structure. On 31-Jul-2005, at 2:35 PM, James W. Walker wrote: > On Jul 31, 2005, at 6:33 AM, Mikey wrote: > >> The GL_POLYGON_SMOOTH code appears to be implemented by Quesa, but >> the other two functions don't appear to get called unless you're >> rendering transparent objects. Just to see what would happen, I >> added missing functions to my rendering code and the jaggies >> finally went bye-bye. Unfortunately, doing this introduces gaps >> between triangles because it starts blending all triangle edges, >> not just ones on the where it's needed. >> >> Any ideas on how to add this type of blended anti-aliasing to Quesa? > > I don't know about that type of antialiasing, but we do have an > open bug, 902982, suggesting that we do antialiasing a different > way, using GL_ARB_multisample. |