Closed jonathangranskog closed 4 years ago
never mind, I found my issue...
Needed to set it back to use the wnd.fbo and clear the view
Yep. that seems to be it. The fbo will by default set the viewport to match the framebuffer size. It can be modified (among other properties) on the fbo itself.
The imgui overlay should also always be rendered last, but I assume it was moved around when experimenting 😄
Yeah, I moved stuff around a lot hehe. Spent an hour or two trying to solve this before posting and then I figured it out as soon as I did. :smile:
Thanks for the quick response though! Also, thanks for moderngl and moderngl-window. They are wonderful.
No problem. We do have a discord server linked in the description as well.
Don't hesitate making issues if you bump into something sub-optimal. Even related to documentation.
Hi,
I'm testing the imgui integration and I'm having some issues. I need to render a scene with OpenGL into an FBO and display this as an image next to another image.
I grabbed the example and added an FBO with simple_framebuffer and then I call
self.fbo.use()
before rendering the cube. When I save the FBO as an image, it looks incorrect. Everything renders normally after commenting outself.fbo.use()
. Is there anything else that has to be done for this to work?Thanks!