Sign in to follow this  
BinaryStylus

GetAdapterModeCount is only returning Zero Modes

Recommended Posts

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!!!

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this