You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the imgui example, there's a set of comments here that say it's sufficient to do this in the renderer constructor if you're only drawing imgui elements.
/* Set appropriate states. If you only draw imgui UI, it is sufficient to do this once in the constructor. */GL::Renderer::enable(GL::Renderer::Feature::Blending);
GL::Renderer::disable(GL::Renderer::Feature::FaceCulling);
GL::Renderer::disable(GL::Renderer::Feature::DepthTest);
GL::Renderer::enable(GL::Renderer::Feature::ScissorTest);
Which suggests you can just comment out these lines:
// /* Reset state. Only needed if you want to draw something else with// different state next frame. */// GL::Renderer::disable(GL::Renderer::Feature::ScissorTest);// GL::Renderer::enable(GL::Renderer::Feature::DepthTest);// GL::Renderer::enable(GL::Renderer::Feature::FaceCulling);// GL::Renderer::disable(GL::Renderer::Feature::Blending);
While this comment seems valid on Emscripten, at least when I build locally with SDL2 this doesn't work. By doing nothing other than commenting out the line disabling the scissor test, I get those solitaire card effects or glitchy Windows95 things being dragged and I get a trail of the old imgui windows.
Frankly, I'm somewhat baffled.
That being said, I probably have an odd setup. I'll just list what I think would be relevant.
You're right -- thinking about it, what happens there is the framebuffer clear at the beginning of drawEvent() being affected by the enabled scissor test from previous frame, clearing only a very tiny part of the screen and leaving the Solitaire trail when you drag windows :)
While attempting to document this, I realized it's easier and simpler to just reset the scissor back in the renderer itself. So that's done in mosra/magnum-integration@e0d2e38.
In the imgui example, there's a set of comments here that say it's sufficient to do this in the renderer constructor if you're only drawing imgui elements.
Which suggests you can just comment out these lines:
While this comment seems valid on Emscripten, at least when I build locally with SDL2 this doesn't work. By doing nothing other than commenting out the line disabling the scissor test, I get those solitaire card effects or glitchy Windows95 things being dragged and I get a trail of the old imgui windows.
Frankly, I'm somewhat baffled.
That being said, I probably have an odd setup. I'll just list what I think would be relevant.
The text was updated successfully, but these errors were encountered: