2025-09-03 13:18:05 -04:00
|
|
|
#include "xmaterialvertexdeclaration.h"
|
|
|
|
|
|
|
|
|
|
XMaterialVertexDeclaration::XMaterialVertexDeclaration()
|
|
|
|
|
: XAsset()
|
|
|
|
|
, mStreamCount(0)
|
|
|
|
|
, mHasOptionalSource(false)
|
|
|
|
|
, mRouting()
|
|
|
|
|
{
|
2025-09-07 12:36:08 -04:00
|
|
|
SetName("Material Vertex Declaration");
|
2025-09-03 13:18:05 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XMaterialVertexDeclaration::Clear()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void XMaterialVertexDeclaration::ParseData(QDataStream *aStream)
|
|
|
|
|
{
|
2025-09-07 12:36:08 -04:00
|
|
|
if (IsDebug())
|
|
|
|
|
{
|
|
|
|
|
qDebug() << QString("[%1]").arg(aStream->device()->pos(), 10, 10, QChar('0')) << "Parsing data for " << XAssetTypeToString(GetType());
|
|
|
|
|
}
|
2025-09-05 18:35:17 -04:00
|
|
|
if (GetPtr() == -1)
|
|
|
|
|
{
|
|
|
|
|
*aStream
|
|
|
|
|
>> mStreamCount
|
|
|
|
|
>> mHasOptionalSource;
|
2025-09-07 12:36:08 -04:00
|
|
|
if (IsDebug())
|
|
|
|
|
{
|
|
|
|
|
qDebug() << QString("[%1]").arg(aStream->device()->pos(), 10, 10, QChar('0')) << " mStreamCount = " << mStreamCount;
|
|
|
|
|
qDebug() << QString("[%1]").arg(aStream->device()->pos(), 10, 10, QChar('0')) << " mHasOptionalSource = " << mHasOptionalSource;
|
|
|
|
|
}
|
2025-09-03 13:18:05 -04:00
|
|
|
|
2025-09-05 18:35:17 -04:00
|
|
|
mRouting.ParseData(aStream);
|
|
|
|
|
}
|
2025-09-03 13:18:05 -04:00
|
|
|
}
|