SDL 2.0 Antialiasing

Hello everybody,

Is there any way to obtain AA in pure SDL 2.0 (without using OpenGL).
I read some articles about it but everything was useless I still dont have AA.

What I have?

Before creating window with OPENGL flag (but not fullscreen)

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

Of course after creating window I call SDL_CreateRenderer with SDL_RENDERER_ACCELERATED flag.

After this all I call

Code:
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &buffers);
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &samples);

And I get buffers = 0, samples = 0… And edges (roteted / scaled textures) are sharp.

Is anything that I do wrong?

BTW. Sorry for my English :wink:

You need to do these before you create the OpenGL context
(SDL_GL_CreateContext() or SDL_SetVideoMode()).
Also, this sets up the attributes only for OpenGL. If SDL decides to use
Direct3D, your AA won’t work. Try forcing SDL to use OpenGL
(SDL_CreateRenderer(window, SDL_VIDEO_RENDER_OGL, 0))On Thu, Nov 14, 2013 at 10:29 AM, szamano wrote:

Hello everybody,

Is there any way to obtain AA in pure SDL 2.0 (without using OpenGL).
I read some articles about it but everything was useless I still dont have
AA.

What I have?

Before creating window with OPENGL flag (but not fullscreen)

Code:

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

Of course after creating window I call SDL_CreateRenderer with
SDL_RENDERER_ACCELERATED flag.

After this all I call

Code:

SDL_GL_GetAttribute(SDL_GL_MULTISAMPLEBUFFERS, &buffers);
SDL_GL_GetAttribute(SDL_GL_MULTISAMPLESAMPLES, &samples);

And I get buffers = 0, samples = 0… And edges (roteted / scaled textures)
are sharp.

Is anything that I do wrong?

BTW. Sorry for my English [image: Wink]


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org