I was trying create a texture with D3D11_USAGE_DYNAMIC and MipLevels equal to 0 (to create all the mip levels). However, the texture failed to be created. Is it possible to use mipmaps with dynamic textures?


1 Answer 1


If you create the device with D3D11_CREATE_DEVICE_DEBUG, you should see the following error:

D3D11 ERROR: ID3D11Device::CreateTexture2D: A D3D11_USAGE_DYNAMIC Resource must have MipLevels equal to 1. [ STATE_CREATION ERROR #102: CREATETEXTURE2D_INVALIDMIPLEVELS]

which is pretty self explanatory.

Use USAGE_DEFAULT and UpdateSubresource(), instead.

This is a decent summary of the options you have:



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .