mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-30 16:00:55 +00:00
- do not send depth bias changes to the GPU if nothing has changed.
This commit is contained in:
parent
50c7793f56
commit
7eef7614f8
2 changed files with 14 additions and 2 deletions
|
@ -9,6 +9,8 @@ struct FStartupInfo
|
||||||
uint32_t FgColor; // Foreground color for title banner
|
uint32_t FgColor; // Foreground color for title banner
|
||||||
uint32_t BkColor; // Background color for title banner
|
uint32_t BkColor; // Background color for title banner
|
||||||
FString Song;
|
FString Song;
|
||||||
|
FString con;
|
||||||
|
FString def;
|
||||||
int Type;
|
int Type;
|
||||||
int LoadLights = -1;
|
int LoadLights = -1;
|
||||||
int LoadBrightmaps = -1;
|
int LoadBrightmaps = -1;
|
||||||
|
|
|
@ -555,18 +555,28 @@ public:
|
||||||
mRenderStyle = rs;
|
mRenderStyle = rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto GetDepthBias()
|
||||||
|
{
|
||||||
|
return mBias;
|
||||||
|
}
|
||||||
|
|
||||||
void SetDepthBias(float a, float b)
|
void SetDepthBias(float a, float b)
|
||||||
{
|
{
|
||||||
|
mBias.mChanged = mBias.mFactor != a || mBias.mUnits != b;
|
||||||
mBias.mFactor = a;
|
mBias.mFactor = a;
|
||||||
mBias.mUnits = b;
|
mBias.mUnits = b;
|
||||||
mBias.mChanged = true;
|
}
|
||||||
|
|
||||||
|
void SetDepthBias(FDepthBiasState& bias)
|
||||||
|
{
|
||||||
|
SetDepthBias(bias.mFactor, bias.mUnits);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearDepthBias()
|
void ClearDepthBias()
|
||||||
{
|
{
|
||||||
|
mBias.mChanged = mBias.mFactor != 0 || mBias.mUnits != 0;
|
||||||
mBias.mFactor = 0;
|
mBias.mFactor = 0;
|
||||||
mBias.mUnits = 0;
|
mBias.mUnits = 0;
|
||||||
mBias.mChanged = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue