- implement ssao
This commit is contained in:
parent
990d61f41a
commit
c00a46043d
14 changed files with 152 additions and 107 deletions
|
|
@ -77,7 +77,6 @@ void FGLRenderState::Reset()
|
|||
|
||||
mEffectState = 0;
|
||||
activeShader = nullptr;
|
||||
mPassType = NORMAL_PASS;
|
||||
|
||||
mCurrentVertexBuffer = nullptr;
|
||||
mCurrentVertexOffsets[0] = mVertexOffsets[0] = 0;
|
||||
|
|
@ -435,11 +434,6 @@ void FGLRenderState::SetColorMask(bool r, bool g, bool b, bool a)
|
|||
glColorMask(r, g, b, a);
|
||||
}
|
||||
|
||||
void FGLRenderState::EnableDrawBufferAttachments(bool on)
|
||||
{
|
||||
EnableDrawBuffers(on ? GetPassDrawBufferCount() : 1);
|
||||
}
|
||||
|
||||
void FGLRenderState::SetStencil(int offs, int op, int flags = -1)
|
||||
{
|
||||
static int op2gl[] = { GL_KEEP, GL_INCR, GL_DECR };
|
||||
|
|
|
|||
|
|
@ -40,14 +40,6 @@ namespace OpenGLRenderer
|
|||
class FShader;
|
||||
struct GLSectorPlane;
|
||||
|
||||
enum EPassType
|
||||
{
|
||||
NORMAL_PASS,
|
||||
GBUFFER_PASS,
|
||||
MAX_PASS_TYPES
|
||||
};
|
||||
|
||||
|
||||
class FGLRenderState : public FRenderState
|
||||
{
|
||||
uint64_t firstFrame = 0;
|
||||
|
|
@ -68,7 +60,6 @@ class FGLRenderState : public FRenderState
|
|||
|
||||
FShader *activeShader;
|
||||
|
||||
EPassType mPassType = NORMAL_PASS;
|
||||
int mNumDrawBuffers = 1;
|
||||
|
||||
bool ApplyShader();
|
||||
|
|
@ -119,17 +110,7 @@ public:
|
|||
mSpecularLevel = specularLevel;
|
||||
}
|
||||
|
||||
void SetPassType(EPassType passType)
|
||||
{
|
||||
mPassType = passType;
|
||||
}
|
||||
|
||||
EPassType GetPassType()
|
||||
{
|
||||
return mPassType;
|
||||
}
|
||||
|
||||
void EnableDrawBuffers(int count)
|
||||
void EnableDrawBuffers(int count) override
|
||||
{
|
||||
count = MIN(count, 3);
|
||||
if (mNumDrawBuffers != count)
|
||||
|
|
@ -140,11 +121,6 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
int GetPassDrawBufferCount()
|
||||
{
|
||||
return mPassType == GBUFFER_PASS ? 3 : 1;
|
||||
}
|
||||
|
||||
void ToggleState(int state, bool on);
|
||||
|
||||
void ClearScreen() override;
|
||||
|
|
@ -156,7 +132,6 @@ public:
|
|||
void SetDepthFunc(int func) override;
|
||||
void SetDepthRange(float min, float max) override;
|
||||
void SetColorMask(bool r, bool g, bool b, bool a) override;
|
||||
void EnableDrawBufferAttachments(bool on) override;
|
||||
void SetStencil(int offs, int op, int flags) override;
|
||||
void SetCulling(int mode) override;
|
||||
void EnableClipDistance(int num, bool state) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue