List of available display modes

Hi!

I wanted to create a function which would give me a list of available
display modes. Width, height and RGBA bit values mostly. Maybe later
some other related information.

But as I went over the SDL API for video modes, I started to think that
this kind of thing isn’t done very easily.

So how have you done it?

O.

Hello !

So how have you done it?

Look at :

http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fListModes

CU

Torsten Giebl wrote:

Hello !

So how have you done it?

Look at :

http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fListModes

Yes, I looked into that. That function has the problem of returning only
resolutions for a specific pixelformat and flags combination. And I
don’t know what combinations should be used to get a good list of
possible modes.

I’m doing OpenGL so the flags parameter is just SDL_OPENGL? Or do I have
to pass the SDL_FULLSCREEN flag too?

I’m not sure, but I think that 16bpp and 32bpp are enough for the bits
per pixel part. But can I get possible refresh rates for those and their
available resolutions?

O.

Hi!

For me getting good list of possible video modes was a pain too. I’ve
written a special function for this to avoid doing the same things
(and mistakes) in each new project. IMHO SDL has bad API for this.
Video API in SDL 1.3 is much improved in this area.–
Roman Kyrylych (??? ???)