Skip to content

Commit 90a30ce

Browse files
committed
Fix binding order in OpenGL rect
1 parent a8d4033 commit 90a30ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugins/opengl/src/opengl_batch.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ void OpenGLBatch::drawRect(
181181
glm::mat4x4 transform) {
182182

183183
auto& gl_shader = static_cast<OpenGLShader&>(shader);
184-
uniforms.insert(uniforms.end(), SpriteBlock{transform});
185-
186184
if (bound_tex || bound_shader != &gl_shader) {
187185
flush();
188186
}
189187
bound_shader = &gl_shader;
190188

189+
uniforms.insert(uniforms.end(), SpriteBlock{transform});
190+
191191
float right = x + width;
192192
float bottom = y + height;
193193
addVertex(x, y, 0.0f, 0.0f);

0 commit comments

Comments
 (0)