Skip to content

Commit a103b96

Browse files
committed
TargetPainter: Use GL_TRIANGLES instead of GL_TRIANGLE_STEP
1 parent 512b151 commit a103b96

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/targetpainter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ void TargetPainter::paint(QNanoPainter *painter)
6767
Q_ASSERT(shaderProgram->isLinked());
6868

6969
// Set up vertex data and buffers for a quad
70-
float vertices[] = {
71-
-1.0f, -1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, 0.0f, -1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
72-
};
70+
float vertices[] = { -1.0f, -1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, 0.0f, -1.0f, 1.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 1.0f };
7371

7472
GLuint VBO, VAO;
7573
glF.glGenVertexArrays(1, &VAO);
@@ -95,7 +93,7 @@ void TargetPainter::paint(QNanoPainter *painter)
9593
glF.glActiveTexture(GL_TEXTURE0);
9694
glF.glBindTexture(GL_TEXTURE_2D, texture.handle());
9795
shaderManager->setUniforms(shaderProgram, 0, QSize(m_target->costumeWidth(), m_target->costumeHeight()), effects); // set texture and effect uniforms
98-
glF.glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
96+
glF.glDrawArrays(GL_TRIANGLES, 0, 6);
9997

10098
// Process the resulting texture
10199
// NOTE: This must happen now, not later, because the alpha channel can be used here

0 commit comments

Comments
 (0)