Skip to content

Commit

Permalink
Disable lines antialiasing in DirectX
Browse files Browse the repository at this point in the history
  • Loading branch information
Oen44 committed Dec 15, 2024
1 parent d9e2a52 commit 73c8be3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/framework/graphics/painter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,9 @@ void Painter::drawLine(const std::vector<float>& vertex, int size, int width)
m_drawLineProgram->setProjectionMatrix(m_projectionMatrix);
m_drawLineProgram->setTextureMatrix(m_textureMatrix);
m_drawLineProgram->setColor(m_color);
#ifndef OPENGL_ES
glEnable(GL_LINE_SMOOTH);
#endif
glLineWidth(width);

PainterShaderProgram::disableAttributeArray(PainterShaderProgram::TEXCOORD_ATTR);
Expand All @@ -711,7 +713,9 @@ void Painter::drawLine(const std::vector<float>& vertex, int size, int width)
glDrawArrays(GL_LINE_STRIP, 0, size);

PainterShaderProgram::enableAttributeArray(PainterShaderProgram::TEXCOORD_ATTR);
#ifndef OPENGL_ES
glDisable(GL_LINE_SMOOTH);
#endif

m_draws += size;
m_calls += 1;
Expand Down

0 comments on commit 73c8be3

Please sign in to comment.