mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-20 15:13:45 +00:00
don't let GFXD3D11TextureTarget::deactivate() try to generate mips if we haven't told that target to do so
This commit is contained in:
parent
7fcdd03b50
commit
3cdbd4e87e
3 changed files with 16 additions and 6 deletions
|
|
@ -108,6 +108,7 @@ void GFXD3D11TextureManager::_innerCreateTexture( GFXD3D11TextureObject *retTex,
|
|||
(numMipLevels == 0 || numMipLevels > 1)&&
|
||||
!(depth > 0) )
|
||||
{
|
||||
if (numMipLevels == 5) Con::errorf("GFXD3D11TextureManager::_innerCreateTexture - numMipLevels == 5 found!");
|
||||
miscFlags |= D3D11_RESOURCE_MISC_GENERATE_MIPS;
|
||||
bindFlags |= D3D11_BIND_RENDER_TARGET; // in order to automatically generate mips. Resource needs to be a rendertarget and shader resource
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue