#### Archived

This topic is now archived and is closed to further replies.

# Trouble creating mipmaps

This topic is 6059 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello all! I''m trying to use D3DX to create mipmap levels for my terrain, but I''m having trouble. It keeps telling me (through the INFO structure it fills for me) that only 1 mip level exists in the texture. Now this could mean two things and I don''t know which. 1. That my image contains only 1 level (which is true - I haven''t created any levels myself. I want d3dx to do this for me). 2. Or that there is one in the FINAL image which it is responsible for creating. It''s a 24 bit texture, 128x128. Here''s the code. Any thoughts would be appreciated! Note: I''m drawing my landscape using repeating textures (texture coordinates from 0.0 to 80.0). I hope that the mip levels will be used in this case autoamtically! (versus the normal case, where a texture is drawn in the distance, rather than "everywhere" like in my case).
	if (FAILED( D3DXCreateTextureFromFileEx(m_pd3dDevice,
"clovers.tga",
D3DX_DEFAULT,
D3DX_DEFAULT,
4,						// mip levels
0,
D3DFMT_UNKNOWN,
D3DPOOL_DEFAULT,		// memory pool
D3DX_FILTER_TRIANGLE ,	// image filter
D3DX_FILTER_BOX,		// mipmap filter
0,
&info,
NULL,
&m_texture)))
{
return E_FAIL;
}