Splash Screen: 16/24 bits vs 16/32 bits; why?

I was wondering, why, when I run a game in a window, I get asked to choose between 16 and 24 bits, and when running full-screen, I get asked to choose between 16 and 32 bits. Also, I know that both 16 and 24 bits are (normally) for RGB, while normally RBGA is 32 bits, so how does this all work in 16 or 24 bits, when I use textures with transparency? :smiley: If somehow, the “alpha” is optimized away when drawing to the screen, and so the screen does not need the “alpha bits”, then what goes in those additional 8 bits when drawing on a 32 bit screen?

Maybe alpha. Maybe nothing. It’s about byte alignment since I guess in full screen you are essentially writing directly to the screen memory and in windowed mode the OS is somewhat in the middle.

I actually thought that when I traced through the code that the bits are completely ignored in windowed mode. I could be misremembering. Because I’ve definitely had alpha written to screen caps before and I always run windowed mode. So clearly it was a 32 bit buffer somewhere.

Generally alpha is not necessarily stored in the target. OpenGL can do it’s job without writing alpha but for a 32 bit buffer it does no harm to write it.

I could be completely making things up, too, but this has been what I’ve gathered from experience.

isnt that for the depth buffer? And has nothing to do with alhpa and rgb(a) whatsoever?

@Empire Phoenix said: isnt that for the depth buffer? And has nothing to do with alhpa and rgb(a) whatsoever?

Z-buffering - Wikipedia

Nope.

http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/desktop/com/jme3/app/SettingsDialog.java#575

http://hub.jmonkeyengine.org/javadoc/com/jme3/system/AppSettings.html#setBitsPerPixel(int)

Wait, isn’t that the color depth of the screen device? What you ask the video driver to provide when it is rasterizing to be drawn on screen (video mode) http://lwjgl.org/wiki/index.php?title=LWJGL_Basics_5_(Fullscreen).

What format you use for textures (ARGB_8888 or whatever) when talking to OpenGL isn’t really relevant here, the video driver/HW will do what needs to be done to draw it to the screen using the video mode.

Or I’m making things up :slight_smile:

@jmaasing said: Wait, isn't that the color depth of the screen device? What you ask the video driver to provide when it is rasterizing to be drawn on screen (video mode) http://lwjgl.org/wiki/index.php?title=LWJGL_Basics_5_(Fullscreen).

What format you use for textures (ARGB_8888 or whatever) when talking to OpenGL isn’t really relevant here, the video driver/HW will do what needs to be done to draw it to the screen using the video mode.

Or I’m making things up :slight_smile:

You have it right. It’s the color bit resolution of the target display.