Skip to content

Commit

Permalink
improve: UIGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
InnerCircleTFS committed Jan 4, 2025
1 parent b26300b commit 3e76365
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/framework/graphics/painter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ void Painter::drawLine(const std::vector<float>& vertex, const int size, const i
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 @@ -136,6 +139,9 @@ void Painter::drawLine(const std::vector<float>& vertex, const int size, const i
glDrawArrays(GL_LINE_STRIP, 0, size);

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

void Painter::resetState()
Expand Down

0 comments on commit 3e76365

Please sign in to comment.