XPlor/libs/xassets/xgfxpixelshaderloaddef.cpp

54 lines
1.0 KiB
C++
Raw Normal View History

2025-09-03 13:07:19 -04:00
#include "xgfxpixelshaderloaddef.h"
XGfxPixelShaderLoadDef::XGfxPixelShaderLoadDef()
: XAsset()
, mCachedPart()
, mPhysicalPart()
, mCachedPartSize(0)
, mPhysicalPartSize(0)
{
}
XGfxPixelShaderLoadDef::~XGfxPixelShaderLoadDef()
{
}
2025-09-07 12:36:08 -04:00
quint16 XGfxPixelShaderLoadDef::GetPhysicalPartSize() const
2025-09-03 13:07:19 -04:00
{
2025-09-07 12:36:08 -04:00
return mPhysicalPartSize;
}
quint16 XGfxPixelShaderLoadDef::GetCachedPartSize() const
{
return mCachedPartSize;
2025-09-03 13:07:19 -04:00
}
void XGfxPixelShaderLoadDef::Clear()
{
mCachedPart.clear();
mPhysicalPart.clear();
mCachedPartSize = 0;
mPhysicalPartSize = 0;
}
2025-09-07 12:36:08 -04:00
void XGfxPixelShaderLoadDef::ParseData(QDataStream *aStream)
{
qint32 cachedPartPtr, physicalPartPtr;
*aStream
>> cachedPartPtr
>> physicalPartPtr
>> mCachedPartSize
>> mPhysicalPartSize;
if (physicalPartPtr)
{
aStream->readRawData(mPhysicalPart.data(), mPhysicalPartSize);
}
if (cachedPartPtr)
{
aStream->readRawData(mCachedPart.data(), mCachedPartSize);
}
}