aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2024-02-04 14:21:29 +0100
committerAndre Weissflog <floooh@gmail.com>2024-02-04 14:21:29 +0100
commite0a149d30ca6a8a13034d495a5e69bbdb276c98f (patch)
tree04cec6e9e25e4017f1f0045c15d2606c5136f37c
parent8c9bdb96802118638295b0df6196db9afeaa7da1 (diff)
sokol_gfx.h gl: fix gles3 code path
-rw-r--r--sokol_gfx.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h
index 0c5c1d30..2062e453 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -8557,11 +8557,11 @@ _SOKOL_PRIVATE void _sg_gl_end_pass(void) {
#if defined(SOKOL_GLES3)
// need to restore framebuffer binding before invalidate if the MSAA resolve had changed the binding
if (fb_draw_bound) {
- glBindFramebuffer(GL_FRAMEBUFFER, pass->gl.fb);
+ glBindFramebuffer(GL_FRAMEBUFFER, atts->gl.fb);
}
GLenum invalidate_atts[SG_MAX_COLOR_ATTACHMENTS + 2] = { 0 };
int att_index = 0;
- for (int i = 0; i < num_atts; i++) {
+ for (int i = 0; i < num_color_atts; i++) {
if (_sg.gl.color_store_actions[i] == SG_STOREACTION_DONTCARE) {
invalidate_atts[att_index++] = (GLenum)(GL_COLOR_ATTACHMENT0 + i);
}