antialiasing polygons

Post: #31
how would u go about adding multisample attributes to the NSOpenGLView? im really no good with pixel formats/buffers/etc at the moment, but could u just give me a brief rundown for future reference?
Quote this message in a reply
Post: #32
In your NSOpenGLView subclass implementation:
- (id)initWithFrame:(NSRect)frameRect{
GLuint attribs[]={NSOpenGLPFAAccelerated,
/* this two attributes enable multisample on every primitive */
NSOpenGLPFASampleBuffers,1, // # of sample buffers
NSOpenGLPFASamples,4, // # of samples
pixelFormat=[[NSOpenGLPixelFormat alloc]initWithAttributes:
[[self openGLContext]makeCurrentContext];
return self;
Quote this message in a reply
Post: #33
another one right on the money. thanks.
Quote this message in a reply
Posts: 130
Joined: 2002.04
Post: #34
GL_RENDERER: Rage 128 OpenGL Engine
drew 231.2k polys per second @ 29.9 fps (gl backface cull)
drew 363.7k polys per second @ 30.3 fps (local backface cull + anti-alias)
drew 643.8k polys per second @ 29.7 fps (gl backface cull)
drew 370.6k polys per second @ 30.3 fps (local backface cull + anti-alias)
drew 618.3k polys per second @ 29.7 fps (gl backface cull)
drew 359.1k polys per second @ 30.0 fps (local backface cull + anti-alias)
drew 649.1k polys per second @ 29.9 fps (gl backface cull)
drew 187.9k polys per second @ 24.0 fps (local backface cull + anti-alias)(was doing weird stuff at the same time)

Hmm... this looks real weird(the data).
(This is one a g3 300)

Lets see what happens if I test it on my Voodoo5 card(with FSAA off, and on Rasp )

"Gameplay Uber Alles. And if you can make it psychedelic too, great!" - Jeff Minter
Quote this message in a reply
Post: #35
Quote:Originally posted by w_reade
hold on, memory (and ASP) tell me I've got a Rage 128 Pro, now I come to think of it. I've got a G4/400 too, so perhaps the "Rage 128" and "Rage 128 Pro" strings have got swapped somewhere? After all, you'd expect that the "Pro" one would be faster.

I like my machine a lot though - it may be a bit old now, but it stayed beefy for longer than any other machine I've had.

The Rage 128 Pro name I thought was just for marketing -- on iMacs the "Pro" meant 16MB vs 8MB, circa 2001 G3 iMacs. There was only one Rage 128 board that I know of -- I don't remember anything about upping the clock frequency. Maybe codemattic has something running in the background? Or a lot of windows open in the Finder -- Quartz Extreme uses OpenGL card memory whenever possible, so might cause some bus traffic and resultant slowdown.
Quote this message in a reply
Post: #36
While the following pixel format works well for fullscreen antialias on any Mac-PowerPC, it doesn't work well on a iMac Mac-Intel. The problems seems to come from these 2 lines:

NSOpenGLPFASampleBuffers, (NSOpenGLPixelFormatAttribute)1,
NSOpenGLPFASamples, (NSOpenGLPixelFormatAttribute)6,

With these two lines, I get garbage in the bottom area of the screen.
Without these 2 lines it works properly, but without antialias.
So, now, how can I get antialias in fullscreen on a Mac-Intel?
The machine is an iMac Mac-Intel with an ATI Radeon X1600 with 128 MB VRAM (120 MB are free). It supports 1 Samples Buffers, and it supports up to 6 samples. Anyway I tried to setup 2 or 4 or 6 samples and I get garbages all the time. When SampleBuffers is set to zero (no antialias) it works well.
I paste here the whole pixelFormat. Any idea?

NSOpenGLPixelFormatAttribute attrs[] = {
NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute)32,
NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute)32,
NSOpenGLPFAAlphaSize, (NSOpenGLPixelFormatAttribute)8,
NSOpenGLPFASampleBuffers, (NSOpenGLPixelFormatAttribute)1,
NSOpenGLPFASamples, (NSOpenGLPixelFormatAttribute)4 ,
NSOpenGLPFAScreenMask, (NSOpenGLPixelFormatAttribute)

Quote this message in a reply
Posts: 776
Joined: 2003.04
Post: #37
You do realize that the post you are answering is more than three years old, right? Wink
For what is worth, (in response to the previous post) "Rage 128" and "Rage 128 Pro" are different.
Quote this message in a reply
Posts: 1,140
Joined: 2005.07
Post: #38
LOL I'm sure they lost 3 years of sleep from that! Good thing you can finally lay their fears to rest. Wink

With regards to FSAA not working, try adding NSOpenGLPFASampleAlpha followed by 1 in that that list. (in case it's confused about what kind of anti-aliasing to use when not specified on the Intel Macs.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  SLOW performance drawing multiple polygons per frame with stencil buffer clam61 7 11,323 Apr 27, 2013 11:53 AM
Last Post: clam61
  glCopyTexSubImage2D vs antialiasing on iPhone? Mark Levin 4 7,660 Jul 16, 2010 01:46 AM
Last Post: Bersaelor
  Antialiasing and NSOpenGLView attributes Jar445 2 8,493 Jan 20, 2009 10:42 AM
Last Post: maximile
  n00b question: getting rid of lines along edges of polygons Andrew 2 4,252 Jun 5, 2005 05:57 PM
Last Post: Andrew
  Depth Sorting Polygons thaeez 2 4,763 Aug 11, 2004 04:23 PM
Last Post: thaeez