GetAdapterModeCount is only returning Zero Modes

Started by
6 comments, last by BinaryStylus 18 years, 1 month ago
Hi. IDirect3D9::GetAdapterModeCount - is only returning Zero for me. Please help. I have enumerated the Display adapters OK - and have just used D3DADAPTER_DEFAULT now anyway cause this has defeated me. Also I am using D3DFMT_A8R8G8B8 as the format. I don't know what I need to do to force this function to do something, I would really love a count of the display adapter modes. I have noticed tho that the DX documentation says "This method returns the number of display modes on this adapter or zero if Adapter is greater than or equal to the number of adapters on the system." "equal" - So if you only got one graphics adapter then this method will not work? Please help - this is lame I know - But I have spent 14 Hours today on this already ~~~ and am getting a little upset. Thanks Guys!!!
BinaryStylusOur greatest glory lies NOT in never falling, but in rising again - every time we do.Only the dead have seen the end of the war
Advertisement
Sorry - Forget that "Equal" comment - I'm just clutching at straws
BinaryStylusOur greatest glory lies NOT in never falling, but in rising again - every time we do.Only the dead have seen the end of the war
So if I can get GetAdapterModeCount to return the number of "Modes" - I can enumerate those modes with: IDirect3D9::EnumAdapterModes.

However one thing I don't understand - and the documentation doesn't make clear - is the return value from IDirect3D9::GetAdapterModeCount the size of the array of D3DDISPLAYMODE objects you use a parameter 4 in IDirect3D9::EnumAdapterModes - or is it something else.

And if I have to use IDirect3D9::EnumAdapterModes for each value up to one-below the return value from IDirect3D9::GetAdapterModeCount - then how many D3DDISPLAYMODE objects do I need allocate in the array of D3DDISPLAYMODE objects I use for parameter 4?

Plesae help

Thanks

BinaryStylusOur greatest glory lies NOT in never falling, but in rising again - every time we do.Only the dead have seen the end of the war
PS - I still cant get IDirect3D9::GetAdapterModeCount to work
BinaryStylusOur greatest glory lies NOT in never falling, but in rising again - every time we do.Only the dead have seen the end of the war
OK - Typical - I just got it to do something.....

I got it to do something by using D3DFMT_X8R8G8B8 instead of D3DFMT_A8R8G8B8 - Is that what you would expect? The MSDN stuff on this is really sparse.

I don't know why I haven't tried this earlier - but that's life! - But is this a fix? - Is it supposed to enumerate display modes for buffers that have no Alpha components only? - Because it says in MSDN that EnumAdapterModes WILL work for D3DFMT_A8R8G8B8. Except I don't think it does?
BinaryStylusOur greatest glory lies NOT in never falling, but in rising again - every time we do.Only the dead have seen the end of the war
Launch the DirectX Caps Viewer. Goto Device Types -> HAL -> Adapter Formats. There is no ARGB mode, right? This is why you are getting 0 adapter modes. GetAdapterModeCount works with ARGB and it tells you that the system doesn't support this mode. XRGB is what you want.
"C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"
OK thanks - Will Try it out
BinaryStylusOur greatest glory lies NOT in never falling, but in rising again - every time we do.Only the dead have seen the end of the war
FANTASTIC - Cheers dude!
BinaryStylusOur greatest glory lies NOT in never falling, but in rising again - every time we do.Only the dead have seen the end of the war

This topic is closed to new replies.

Advertisement