6

I've been trying to get SDL FSAA with multisampling working, but it doesn't want to.

I started with something simple:

SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 2);

But I do the associated gets and it returns 0 for buffers and 1 for samples (both before and after SetVideo).

I tried it both on my GeForce 280M, and suspecting it was a mobile issue, tried it on my 580 with no luck either.

I'm running Windows 7 with up-to-date drivers.

If I force FSAA on in the NVidia Control Panel it works great, but I can't seem to get the application to enable it.

Any ideas?

McKinley
  • 1,123
  • 1
  • 8
  • 18
Chad Mourning
  • 608
  • 2
  • 12
  • 25
  • FSAA is full screen anti aliasing. It renders in high resolution and then scales the sesult down to display. MSAA is multi sampling anti aliasing. Here only the depth buffer is scaled up and the percentage of visible depth pixels defines opaqueness. FSAA with Multisampling doesn't exist. – Arne Feb 22 '15 at 22:58

1 Answers1

1

Those functions should return 0 or -1. They should never return 1 . . . so I don't know what's going on there. Are those return values for some other function?

Anyway, it's important to note that these are requests. There's no guarantee that they are what you think they are. That's why the SDL_GL_GetAttribute function exists (call it AFTER SDL_SetVideoMode to see what you got).

You're requesting a multisampling buffer with two samples per pixel. That's not a terribly large amount of multisampling. BEFORE SDL_SetVideoMode, try the following:

SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,16);

And if you see smoothed edges, don't worry about it.

geometrian
  • 14,775
  • 10
  • 56
  • 132
  • The 0 and 1 were the value when I called SDL_GL_GetAttribute after creation of the context. So, it appears my requests were ignored; I'm just not sure why. I just chose 2, because I assumed it was the most likely to succeed. – Chad Mourning Feb 21 '12 at 22:56
  • I see. It might be the case that the card doesn't support 2. I'd use something larger. Ordinarily, I'd recommend 4 or 8, but I've successfully used 32 on my 580 (M) for FBOs, and I'd be surprised if 16 doesn't work. In any case, I'd worry more about what you see. If it looks all soft and smooth, don't worry about what SDL_GL_GetAttribute(...) says. – geometrian Feb 27 '12 at 06:05