How to query max supported values of SDL_GL_DEPTH_SIZE and SDL_GL_MULTISAMPLESAMPLES?

Hello,

I wonder what’s the best way to get max supported values of SDL_GL_* attributes.
Most important attributes for me are SDL_GL_MULTISAMPLESAMPLES and SDL_GL_DEPTH_SIZE.
The important requirement is that it should work for both GL 2.0 (possibly ES) and GL 3+.
I don’t think that brute force retry loop is really the best approach.

Thanks.

You can query the value for an attribute by calling the SDL_GL_GetAttribute() function, passing in the attribute type you wish to retrieve.

Check this for more information:

You can query the value for an attribute by calling the SDL_GL_GetAttribute() function, passing in the attribute type you wish to retrieve.

This is not an answer to the question I asked, unfortunatelly.

what’s the best way to get max supported values of SDL_GL_* attributes

1 Like

Then I misread. Sorry.