how to get texture size in bytes
plakapenka opened this issue · 6 comments
plakapenka commented
I won't stop apologizing, but...
How to get the size of a texture that lies on an object, in bytes, by model number or entity point?
Pirulax commented
Could you elaborate please?
plakapenka commented
Pirulax commented
just get the associated rwdict (it should be in the model info), and get it's size.
edit: it's m_nTxdIndex
plakapenka commented
Like?
auto modelInfo = CModelInfo::GetModelInfo(modelId)->AsPedModelInfoPtr();
auto txd = CTxdStore::ms_pTxdPool->GetAt(modelInfo->m_nTxdIndex);
ok, I saw this, but I still don’t understand where to get the size from RwTexDictionary
Pirulax commented
you can get the CStreamingInfo of the txd.
eg CStreaming::GetInfo(TXDToModelID(modelInfo->m_nTxdIndex))
...
plakapenka commented
ahhhh, got it. Thank you