Skip to content

Commit

Permalink
Fix brush cursor not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
azagaya committed Feb 22, 2021
1 parent 2dac36a commit 05fca71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/open_gl_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,9 @@ void OpenGlWidget::update_scene()
transform.scale(x, y, 1);
cursorProgram.bind();
lightVAO.bind();
cursorProgram.setUniformValue("transform", projection * view * transform);
cursorProgram.setUniformValue("transform", transform);
cursorProgram.setUniformValue("projection", projection);
cursorProgram.setUniformValue("view", view);
brushTexture->bind(0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
GL_NEAREST_MIPMAP_NEAREST);
Expand All @@ -461,7 +463,6 @@ void OpenGlWidget::update_scene()
cursorProgram.setUniformValue("pixelSize", 1.0 / brushTexture->width(), 1.0 / brushTexture->height());
cursorProgram.setUniformValue("pixelated", false);
cursorProgram.setUniformValue("zoom", m_global_zoom);
color = QVector3D(0.2, 0.2, 0.2);

VBO.bind();
float vertices[] = {
Expand Down

0 comments on commit 05fca71

Please # to comment.