- do not send depth bias changes to the GPU if nothing has changed.

This commit is contained in:
Christoph Oelckers 2021-05-21 21:01:20 +02:00
parent 50c7793f56
commit 7eef7614f8
2 changed files with 14 additions and 2 deletions

View file

@ -9,6 +9,8 @@ struct FStartupInfo
uint32_t FgColor; // Foreground color for title banner
uint32_t BkColor; // Background color for title banner
FString Song;
FString con;
FString def;
int Type;
int LoadLights = -1;
int LoadBrightmaps = -1;

View file

@ -555,18 +555,28 @@ public:
mRenderStyle = rs;
}
auto GetDepthBias()
{
return mBias;
}
void SetDepthBias(float a, float b)
{
mBias.mChanged = mBias.mFactor != a || mBias.mUnits != b;
mBias.mFactor = a;
mBias.mUnits = b;
mBias.mChanged = true;
}
void SetDepthBias(FDepthBiasState& bias)
{
SetDepthBias(bias.mFactor, bias.mUnits);
}
void ClearDepthBias()
{
mBias.mChanged = mBias.mFactor != 0 || mBias.mUnits != 0;
mBias.mFactor = 0;
mBias.mUnits = 0;
mBias.mChanged = true;
}
private: