d3d maximum texture size

Started by
1 comment, last by Lovens 14 years, 1 month ago
Hi, I use VS 2008 (C#) and MDX, I have to display large images (images with sizes in order of several thousand pixels), but it seems that D3D cannot accept large textures (for instance when I load a 5700 x 5700 BMP, d3d crashes), so I'm going to divide my big texture into several smaller textures, how can I find the maximum texture size supported? any tips or suggestions? thanks
Visit galaxyroad.com which soon will have english contents too
Advertisement
The Caps structure will tell you in MaxTextureWidth and MaxTextureHeight. And you can check with the DirectX Caps Viewer (Which comes with the SDK). Generally it's 4096 for NVidia hardware and 2048 for older ATI (Although you'll need to check at runtime to be sure).

Also note that if the card doesn't support non-power of 2 textures, they'll be rounded up to the next power of 2 (8192x8192 in your case) if you're using D3DX, or the creation will fail if not.

EDIT: Ah, that's in C++ - C# will be similar.

Also, the minimum maximum texture size is 256x256 for DX9 hardware - so you can always assume that at least 256x256 is ok to create.
This thread might help you.
__________________________Lovens "CAPONE" WecheProgrammer

This topic is closed to new replies.

Advertisement