Skip to content

Commit

Permalink
Fix binding order in OpenGL rect
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelOtter committed Mar 21, 2024
1 parent a8d4033 commit 90a30ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/opengl/src/opengl_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,13 @@ void OpenGLBatch::drawRect(
glm::mat4x4 transform) {

auto& gl_shader = static_cast<OpenGLShader&>(shader);
uniforms.insert(uniforms.end(), SpriteBlock{transform});

if (bound_tex || bound_shader != &gl_shader) {
flush();
}
bound_shader = &gl_shader;

uniforms.insert(uniforms.end(), SpriteBlock{transform});

float right = x + width;
float bottom = y + height;
addVertex(x, y, 0.0f, 0.0f);
Expand Down

0 comments on commit 90a30ce

Please sign in to comment.