Selecting a backup bpp for displaymode

Started by elias4444, December 17, 2004, 16:06:33

Previous topic - Next topic

elias4444

Anyone know how to resolve this one?

I want to use 32bpp in my games, and for most people, it works just fine. However, I ran into one test case where the machine doesn't support 32bpp, only 24bpp.  :?:

Is there a way in the displaymode loop to say pick 32bpp if it's there, but fall back on 24 or 16bpp otherwise? Or would I just have to loop through all the options manually?
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

Matzon

yes, take a look at the getAvailableDisplayModes in the org.lwjgl.util.Display class and also setDisplayMode

elias4444

That's what I'm using right now. I get the available display modes, loop through for 1024x768x32, and if that's not there, I grab whatever bpp they're currently set at. I'm running into two issues though:

1. On windows machines that don't support 32bpp, it just bombs out with exceptions (is 24bpp in Windows even supported by lwjgl? I've only run into this on one older machine that was using an old, integrated intel 810 graphics adapter).

2. On linux, 32bpp doesn't really exist - it's called 24bpp. I'm not sure what the system returns however, but I can tell it's not 32bpp, as the colors are less fluid.

Any ideas?
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com