XPlor/libs/xassets/xgfxpixelshaderloaddef.cpp

54 lines
1.1 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)
{
2025-09-10 21:58:26 -04:00
SetName("GFX Pixel Shader Load Definition");
2025-09-03 13:07:19 -04:00
}
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
2025-09-10 21:58:26 -04:00
void XGfxPixelShaderLoadDef::ParseData(XDataStream *aStream)
2025-09-07 12:36:08 -04:00
{
qint32 cachedPartPtr, physicalPartPtr;
*aStream
>> cachedPartPtr
>> physicalPartPtr
>> mCachedPartSize
>> mPhysicalPartSize;
if (physicalPartPtr)
{
aStream->readRawData(mPhysicalPart.data(), mPhysicalPartSize);
}
if (cachedPartPtr)
{
aStream->readRawData(mCachedPart.data(), mCachedPartSize);
}
}