문제

To enable multisampling I am using the following code in my project:

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

Do I also need to call glEnable(GL_MULTISAMPLE);?

I see no difference if I don't call it.

도움이 되었습니까?

해결책

Yes, without enabling multisampling primitives will get rendered aliased. This is a feature, because some graphics algorithms break if multisampling gets applied to them, so it's desireable to deliberately enable and disable it throughout rendering.

That being said, double buffering and depth resolution have nothing to do with multisampling. The relevant attributes are SDL_GL_MULTISAMPLEBUFFERS and SDL_GL_MULTISAMPLESAMPLES

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top