1
0
forked from 0ad/0ad

Fix some rendering glitches

This was SVN commit r7335.
This commit is contained in:
Ykkrosh 2010-02-28 21:29:23 +00:00
parent d1f53b9654
commit 275d22742d
2 changed files with 7 additions and 1 deletions

View File

@ -64,6 +64,8 @@ void OverlayRenderer::RenderOverlays()
pglBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
}
glDisable(GL_TEXTURE_2D);
for (size_t i = 0; i < m->lines.size(); ++i)
{
SOverlayLine* line = m->lines[i];

View File

@ -309,7 +309,8 @@ void TerrainOverlay::RenderTileOutline(const CColor& colour, int line_width, boo
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glLineWidth((float)line_width);
if (line_width != 1)
glLineWidth((float)line_width);
CVector3D pos;
glBegin(GL_QUADS);
@ -319,4 +320,7 @@ void TerrainOverlay::RenderTileOutline(const CColor& colour, int line_width, boo
m_Terrain->CalcPosition(i+1, j+1, pos); glVertex3fv(pos.GetFloatArray());
m_Terrain->CalcPosition(i, j+1, pos); glVertex3fv(pos.GetFloatArray());
glEnd();
if (line_width != 1)
glLineWidth(1.0f);
}