Bugfix: Don't bloom the wireframes

This commit is contained in:
parax0 2015-11-26 05:12:12 -07:00
parent 0cc018c23f
commit 566ad89d38
4 changed files with 8 additions and 4 deletions

View File

@ -122,14 +122,16 @@ void CModel::DrawSurface(ERenderOptions Options, u32 Surface, u32 MatSet)
mVBO.Unbind();
}
void CModel::DrawWireframe(ERenderOptions Options, const CColor& WireColor)
void CModel::DrawWireframe(ERenderOptions Options, CColor WireColor /*= CColor::skWhite*/)
{
if (!mBuffered) BufferGL();
// Set up wireframe
WireColor.a = 0;
CDrawUtil::UseColorShader(WireColor);
Options |= eNoMaterialSetup;
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glBlendFunc(GL_ONE, GL_ZERO);
// Draw surfaces
for (u32 iSurf = 0; iSurf < mSurfaces.size(); iSurf++)

View File

@ -27,7 +27,7 @@ public:
void ClearGLBuffer();
void Draw(ERenderOptions Options, u32 MatSet);
void DrawSurface(ERenderOptions Options, u32 Surface, u32 MatSet);
void DrawWireframe(ERenderOptions Options, const CColor& WireColor = CColor::skWhite);
void DrawWireframe(ERenderOptions Options, CColor WireColor = CColor::skWhite);
u32 GetMatSetCount();
u32 GetMatCount();

View File

@ -144,14 +144,16 @@ void CStaticModel::DrawSurface(ERenderOptions Options, u32 Surface)
mVBO.Unbind();
}
void CStaticModel::DrawWireframe(ERenderOptions Options, const CColor& WireColor)
void CStaticModel::DrawWireframe(ERenderOptions Options, CColor WireColor /*= CColor::skWhite*/)
{
if (!mBuffered) BufferGL();
// Set up wireframe
WireColor.a = 0;
CDrawUtil::UseColorShader(WireColor);
Options |= eNoMaterialSetup;
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glBlendFunc(GL_ONE, GL_ZERO);
// Draw surfaces
for (u32 iSurf = 0; iSurf < mSurfaces.size(); iSurf++)

View File

@ -26,7 +26,7 @@ public:
void ClearGLBuffer();
void Draw(ERenderOptions Options);
void DrawSurface(ERenderOptions Options, u32 Surface);
void DrawWireframe(ERenderOptions Options, const CColor& WireColor);
void DrawWireframe(ERenderOptions Options, CColor WireColor = CColor::skWhite);
CMaterial* GetMaterial();
void SetMaterial(CMaterial *pMat);