Original Post
Got a weird problem with my enumeration code... Basically, it''s not returning anything less than 1600x1200 for any of the 16bit color modes.
My code looks like this:
numDisplayModes = l_D3D->GetAdapterModeCount( D3DADAPTER_DEFAULT );
for ( int i = 0; i <= numDisplayModes; i++ )
{
l_D3D->EnumAdapterModes( D3DADAPTER_DEFAULT, i, &displayMode );
cout << displayMode.Width << " x " << displayMode.Height << " " << displayMode.Format << std::endl;
}
std::cout << "D3DFORMAT D3DFMT_X8R8G8B8: " << D3DFMT_X8R8G8B8 << std::endl;
std::cout << "D3DFORMAT D3DFMT_R5G6B5: " << D3DFMT_R5G6B5 << std::endl;
As you can see, all the code does is loop through all the display modes and prints their resolution and D3D format. At the bottom I just print the 16 and 32 bit D3D formats for comparison.
My graphics card is a Geforce 2, which obviously supports other 16bit color resolutions - as is proven to me when I run any of the Direct3D samples and I get a correct list of modes, or when I enter control panel->display and can change to those modes!
I''ve looked through the D3D sample source but I can''t find anything major that i''m doing differently. If anyone can shed any light on the problem I would be greatful.