Sign in to follow this  
ibr_ozdemir

About Mipmap

Recommended Posts

ibr_ozdemir    135
hi, i read that direct3d handle mipmap automatically direct3d loads a picture and multiply it step by step which "D3DXCreateTextureFromFile" command. When does it stop? example : i load a 128x256 picture the last picture is 2x4 right?

Share this post


Link to post
Share on other sites
ibr_ozdemir    135
and there is one thing

the book that i read says:"if the device supports mipmap" how can i check that device supporting and today's devices are generally supporting mipmap right?

Share this post


Link to post
Share on other sites
Evil Steve    2017
Quote:
Original post by Namethatnobodyelsetook
Assuming you can find a card that doesn't support mipmapping, you won't want to support it unless you're making a simple 2D puzzle game or something. Mip maps have been standard for a long, long time.
I think that if he can find a card that doesn't support mip mapping, it's likely to be running Windows 95 or something, and probably unable to run his application anyway.

So yeah, you can pretty much assume that all cards support mip mapping.

Share this post


Link to post
Share on other sites
There's also the difference between those cards that support mip-mapping (which is, as mentioned, basically all of them), and those that support auto-mip-map generation for textures (of which I have no idea what the support coverage is). There's a cap bit that can be queried for that, though.

Share this post


Link to post
Share on other sites
jollyjeffers    1570
It's IDirect3D9::CheckDeviceFormat() with D3DCAPS2_CANAUTOGENMIPMAP for automatic generation of Mip-Maps. The 'cardcaps.xls' spreadsheet indicates this as lowest common denominator for DX9 only.

D3DPTEXTURECAPS_MIPMAP in D3DCAPS9::TextureCaps for more general usage of Mip-Mapping. The 'cardcaps.xls' spreadsheet indicates this as lowest common denominator since DX6. If you can find ANY hardware that isn't base-level DX6 (which is probably DDI5 or DDI-3) then you deserve a medal [lol]

Quote:
i load a 128x256 picture
the last picture is 2x4 right?
If you'd looked through the SDK documentation you'd of found this note in 'Texture Filtering with Mipmaps':
Quote:
Note Each surface in a mipmap chain has dimensions that are one-half that of the previous surface in the chain. If the top-level mipmap has dimensions of 256x128, the dimensions of the second-level mipmap are 128x64, the third-level are 64x32, and so on, down to 1x1. You cannot request a number of mipmap levels in Levels that would cause either the width or height of any mipmap in the chain to be smaller than 1. In the simple case of a 4x2 top-level mipmap surface, the maximum value allowed for Levels is three. The top-level dimensions are 4x2, the second-level dimensions are 2x1, and the dimensions for the third level are 1x1. A value larger than 3 in Levels results in a fractional value in the height of the second-level mipmap, and is therefore disallowed.


hth
Jack

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