Bugfix: Don't bloom the wireframes
This commit is contained in:
parent
0cc018c23f
commit
566ad89d38
|
@ -122,14 +122,16 @@ void CModel::DrawSurface(ERenderOptions Options, u32 Surface, u32 MatSet)
|
||||||
mVBO.Unbind();
|
mVBO.Unbind();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CModel::DrawWireframe(ERenderOptions Options, const CColor& WireColor)
|
void CModel::DrawWireframe(ERenderOptions Options, CColor WireColor /*= CColor::skWhite*/)
|
||||||
{
|
{
|
||||||
if (!mBuffered) BufferGL();
|
if (!mBuffered) BufferGL();
|
||||||
|
|
||||||
// Set up wireframe
|
// Set up wireframe
|
||||||
|
WireColor.a = 0;
|
||||||
CDrawUtil::UseColorShader(WireColor);
|
CDrawUtil::UseColorShader(WireColor);
|
||||||
Options |= eNoMaterialSetup;
|
Options |= eNoMaterialSetup;
|
||||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||||
|
glBlendFunc(GL_ONE, GL_ZERO);
|
||||||
|
|
||||||
// Draw surfaces
|
// Draw surfaces
|
||||||
for (u32 iSurf = 0; iSurf < mSurfaces.size(); iSurf++)
|
for (u32 iSurf = 0; iSurf < mSurfaces.size(); iSurf++)
|
||||||
|
|
|
@ -27,7 +27,7 @@ public:
|
||||||
void ClearGLBuffer();
|
void ClearGLBuffer();
|
||||||
void Draw(ERenderOptions Options, u32 MatSet);
|
void Draw(ERenderOptions Options, u32 MatSet);
|
||||||
void DrawSurface(ERenderOptions Options, u32 Surface, 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 GetMatSetCount();
|
||||||
u32 GetMatCount();
|
u32 GetMatCount();
|
||||||
|
|
|
@ -144,14 +144,16 @@ void CStaticModel::DrawSurface(ERenderOptions Options, u32 Surface)
|
||||||
mVBO.Unbind();
|
mVBO.Unbind();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStaticModel::DrawWireframe(ERenderOptions Options, const CColor& WireColor)
|
void CStaticModel::DrawWireframe(ERenderOptions Options, CColor WireColor /*= CColor::skWhite*/)
|
||||||
{
|
{
|
||||||
if (!mBuffered) BufferGL();
|
if (!mBuffered) BufferGL();
|
||||||
|
|
||||||
// Set up wireframe
|
// Set up wireframe
|
||||||
|
WireColor.a = 0;
|
||||||
CDrawUtil::UseColorShader(WireColor);
|
CDrawUtil::UseColorShader(WireColor);
|
||||||
Options |= eNoMaterialSetup;
|
Options |= eNoMaterialSetup;
|
||||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||||
|
glBlendFunc(GL_ONE, GL_ZERO);
|
||||||
|
|
||||||
// Draw surfaces
|
// Draw surfaces
|
||||||
for (u32 iSurf = 0; iSurf < mSurfaces.size(); iSurf++)
|
for (u32 iSurf = 0; iSurf < mSurfaces.size(); iSurf++)
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
void ClearGLBuffer();
|
void ClearGLBuffer();
|
||||||
void Draw(ERenderOptions Options);
|
void Draw(ERenderOptions Options);
|
||||||
void DrawSurface(ERenderOptions Options, u32 Surface);
|
void DrawSurface(ERenderOptions Options, u32 Surface);
|
||||||
void DrawWireframe(ERenderOptions Options, const CColor& WireColor);
|
void DrawWireframe(ERenderOptions Options, CColor WireColor = CColor::skWhite);
|
||||||
|
|
||||||
CMaterial* GetMaterial();
|
CMaterial* GetMaterial();
|
||||||
void SetMaterial(CMaterial *pMat);
|
void SetMaterial(CMaterial *pMat);
|
||||||
|
|
Loading…
Reference in New Issue