XNA - Common SurfaceFormat?

Started by
2 comments, last by QuinnJohns 12 years, 7 months ago
[font="Verdana"]I've done some device enumeration with SupportedDisplaymodes, et al[/font]

[font="Verdana"]
List<DisplayMode> dmList = new List<DisplayMode>();
public void GetDeviceEnumeration()
{
foreach (DisplayMode dm in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes)
{
dmList.Add(dm);
}
}

[/font][font="Verdana"]One thing I've noticed is that the graphics device, returns multiple resolutions, at different surface formats, being BGR565 and COLOR. After some research, I've found that BGR 565 is used on Windows Phone 7, and on PC, but not on XBOX 360. However, COLOR is used on both, but it is inherently not as quick. Is one "commonly used" over the other in terms of selected surface formats? and why? in industry or indie games? I'm currently doing development for both PC and Windows Phone games, however, this enumeration is only being used to generate list boxes in the "options" screens of the PC games only. I'd love to hear some input from the community on both.[/font]

[font="Verdana"]Thanks![/font]
[size="2"][size="1"][size="2"]- Quinn
[size="2"][size="1"][size="2"]Software Developer, Mintrus
Advertisement
BGR 565 is what is commonly referred to as 16bit colors.
COLOR on the other hand is 32bit colors.

I'd say that most modern games do not provide you with the option to select the color space by yourself and just default to 32bit.
For the backbuffer, Color is pretty much the standard (RGBA - 8 bits each), like Hyunkel explained. One of the goals of XNA is to "collapse caps" between different devices (phone, Xbox, PC) and try to have an API that is somewhat uniform, allowing you to write code once and have it run on other devices (Windows devices...but still). That's also why if you notice, in creating render targets or the graphics device the presentation parameters are "preferred" this or that. If you set the preferred format to be BGR 565, the code will still run on the Xbox because the framework will choose the next best format to use. But usually when dealing with the backbuffer, the Color format is the standard. But it also depends on what you're trying to do when you go to the non-PC devices (especially the phone), as you're dealing with hardware that is not as fast or has as much memory as your PC, so you may have to sacrifice quality for performance.
Thanks for the input!
[size="2"][size="1"][size="2"]- Quinn
[size="2"][size="1"][size="2"]Software Developer, Mintrus

This topic is closed to new replies.

Advertisement