I haven’t got a testcase for this because it’s quite tricky to create one, but I’m seeing a different behavior in SDL 2.0.18 compared with SDL 2.0.16 which I’m suspicious is related to SDL_RenderFlush()
.
In my app I mix SDL2 calls with direct OpenGL calls (specifically so I can call glLogicOp()
to achieve OR, AND and XOR plotting). Because of batching I call SDL_RenderFlush()
before and after every non-standard rendering operation; I was assured this was legitimate. So typically:
SDL_RenderFlush(renderer);
glEnable(GL_COLOR_LOGIC_OP);
glLogicOp(GL_AND);
SDL_RenderDrawLine(renderer, x1, y1, x2, y2);
SDL_RenderFlush(renderer);
glDisable(GL_COLOR_LOGIC_OP);
This works as expected in SDL 2.0.16 and earlier, but in SDL 2.0.18 I’m seeing some lines drawn, apparently, with the wrong logical operation. This could be explained if SDL_RenderFlush()
is no longer working as intended (for example if it’s been affected by the SDL_RenderDrawLine()
fixes).
Can anybody shed any light on this, and perhaps suggest a workaround, because my app is currently broken in SDL 2.0.18.