mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Log reserving texture units
This commit is contained in:
parent
88567cd363
commit
e007dc9d6b
2 changed files with 21 additions and 1 deletions
|
@ -568,7 +568,6 @@ namespace MWRender
|
|||
{
|
||||
int skyTextureUnit = mResourceSystem->getSceneManager()->getShaderManager().reserveGlobalTextureUnits(
|
||||
Shader::ShaderManager::Slot::SkyTexture);
|
||||
Log(Debug::Info) << "Reserving texture unit for sky RTT: " << skyTextureUnit;
|
||||
mPerViewUniformStateUpdater->enableSkyRTT(skyTextureUnit, mSky->getSkyRTT());
|
||||
}
|
||||
|
||||
|
|
|
@ -713,6 +713,27 @@ namespace Shader
|
|||
|
||||
mReservedTextureUnitsBySlot[static_cast<int>(slot)] = unit;
|
||||
|
||||
std::string_view slotDescr;
|
||||
switch (slot)
|
||||
{
|
||||
case Slot::OpaqueDepthTexture:
|
||||
slotDescr = "opaque depth texture";
|
||||
break;
|
||||
case Slot::SkyTexture:
|
||||
slotDescr = "sky RTT";
|
||||
break;
|
||||
case Slot::ShadowMaps:
|
||||
slotDescr = "shadow maps";
|
||||
break;
|
||||
default:
|
||||
slotDescr = "UNKNOWN";
|
||||
}
|
||||
if (unit.count == 1)
|
||||
Log(Debug::Info) << "Reserving texture unit for " << slotDescr << ": " << unit.index;
|
||||
else
|
||||
Log(Debug::Info) << "Reserving texture units for " << slotDescr << ": " << unit.index << ".."
|
||||
<< (unit.index + count - 1);
|
||||
|
||||
return unit.index;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue