• Advertisement
Sign in to follow this  

XNA - Common SurfaceFormat?

This topic is 2350 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement