mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
- removed some unused content from FGLRenderState.
This commit is contained in:
parent
9a03ba3cc5
commit
4603d01ba1
2 changed files with 5 additions and 48 deletions
|
@ -38,8 +38,6 @@
|
|||
#include "gl/renderer/gl_renderbuffers.h"
|
||||
#include "gl/textures/gl_hwtexture.h"
|
||||
|
||||
void gl_SetTextureMode(int type);
|
||||
|
||||
FGLRenderState gl_RenderState;
|
||||
|
||||
CVAR(Bool, gl_direct_state_change, true, 0)
|
||||
|
@ -63,8 +61,6 @@ void FGLRenderState::Reset()
|
|||
{
|
||||
mTextureEnabled = true;
|
||||
mSplitEnabled = mBrightmapEnabled = mFogEnabled = mGlowEnabled = false;
|
||||
mColorMask[0] = mColorMask[1] = mColorMask[2] = mColorMask[3] = true;
|
||||
currentColorMask[0] = currentColorMask[1] = currentColorMask[2] = currentColorMask[3] = true;
|
||||
mFogColor.d = -1;
|
||||
mTextureMode = -1;
|
||||
mDesaturation = 0;
|
||||
|
@ -253,8 +249,6 @@ void FGLRenderState::Apply()
|
|||
}
|
||||
}
|
||||
|
||||
//ApplyColorMask(); I don't think this is needed.
|
||||
|
||||
if (mVertexBuffer != mCurrentVertexBuffer)
|
||||
{
|
||||
if (mVertexBuffer == NULL) glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
|
@ -266,21 +260,6 @@ void FGLRenderState::Apply()
|
|||
|
||||
|
||||
|
||||
void FGLRenderState::ApplyColorMask()
|
||||
{
|
||||
if ((mColorMask[0] != currentColorMask[0]) ||
|
||||
(mColorMask[1] != currentColorMask[1]) ||
|
||||
(mColorMask[2] != currentColorMask[2]) ||
|
||||
(mColorMask[3] != currentColorMask[3]))
|
||||
{
|
||||
glColorMask(mColorMask[0], mColorMask[1], mColorMask[2], mColorMask[3]);
|
||||
currentColorMask[0] = mColorMask[0];
|
||||
currentColorMask[1] = mColorMask[1];
|
||||
currentColorMask[2] = mColorMask[2];
|
||||
currentColorMask[3] = mColorMask[3];
|
||||
}
|
||||
}
|
||||
|
||||
void FGLRenderState::ApplyLightIndex(int index)
|
||||
{
|
||||
if (index > -1 && GLRenderer->mLights->GetBufferType() == GL_UNIFORM_BUFFER)
|
||||
|
|
|
@ -72,16 +72,17 @@ enum EPassType
|
|||
MAX_PASS_TYPES
|
||||
};
|
||||
|
||||
class FGLRenderState
|
||||
class FRenderState
|
||||
{
|
||||
};
|
||||
|
||||
class FGLRenderState : public FRenderState
|
||||
{
|
||||
friend void gl_SetTextureMode(int type);
|
||||
bool mTextureEnabled;
|
||||
uint8_t mFogEnabled;
|
||||
bool mGlowEnabled;
|
||||
bool mSplitEnabled;
|
||||
bool mBrightmapEnabled;
|
||||
bool mColorMask[4];
|
||||
bool currentColorMask[4];
|
||||
int mSpecialEffect;
|
||||
int mTextureMode;
|
||||
int mDesaturation;
|
||||
|
@ -151,7 +152,6 @@ public:
|
|||
void SetMaterial(FMaterial *mat, int clampmode, int translation, int overrideshader, bool alphatexture);
|
||||
|
||||
void Apply();
|
||||
void ApplyColorMask();
|
||||
void ApplyLightIndex(int index);
|
||||
|
||||
void SetVertexBuffer(FVertexBuffer *vb)
|
||||
|
@ -199,28 +199,6 @@ public:
|
|||
mDesaturation = 0;
|
||||
}
|
||||
|
||||
void GetColorMask(bool& r, bool &g, bool& b, bool& a) const
|
||||
{
|
||||
r = mColorMask[0];
|
||||
g = mColorMask[1];
|
||||
b = mColorMask[2];
|
||||
a = mColorMask[3];
|
||||
}
|
||||
|
||||
void SetColorMask(bool r, bool g, bool b, bool a)
|
||||
{
|
||||
mColorMask[0] = r;
|
||||
mColorMask[1] = g;
|
||||
mColorMask[2] = b;
|
||||
mColorMask[3] = a;
|
||||
}
|
||||
|
||||
void ResetColorMask()
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
mColorMask[i] = true;
|
||||
}
|
||||
|
||||
void SetTextureMode(int mode)
|
||||
{
|
||||
mTextureMode = mode;
|
||||
|
|
Loading…
Reference in a new issue