how to get texture size in bytes
plakapenka opened this issue · comments
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?
Could you elaborate please?
just get the associated rwdict (it should be in the model info), and get it's size.
edit: it's m_nTxdIndex
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
you can get the CStreamingInfo of the txd.
eg CStreaming::GetInfo(TXDToModelID(modelInfo->m_nTxdIndex))
...
ahhhh, got it. Thank you