Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImGui show box ui even if none of menu are called betwen newframe() and render() #8371

Open
CoreNest opened this issue Feb 3, 2025 · 2 comments

Comments

@CoreNest
Copy link

CoreNest commented Feb 3, 2025

Version/Branch of Dear ImGui:

v1.91.3-docking

Back-ends:

imgui_impl_opengl3 imgui_impl_glfw

Compiler, OS:

g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

Full config/build information:

No response

Details:

Image
when additional box when box of ui are connected in to one with missing ui elemnet like text and buttons

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

// Here's some code anyone can copy and paste to reproduce your issue
in 1 st render loop to window buffer 

ImGui::Begin("Example Bug");
ImGui::Text("t1");
ImGui::End();
ImGui::Begin("Example Bug2");
ImGui::Text("t2");
ImGui::End();

in 2nd render loop to fbo 
 // Example Bug Example Bug2 is shown when connected in to one box
ImGui::Begin("Example Bug3");
ImGui::Text("t3");
ImGui::End();
@ocornut
Copy link
Owner

ocornut commented Feb 4, 2025

I don't understand your sentences, nor the example, nor the screenshots.
Please try to explain this in more details.

@PathogenDavid
Copy link
Contributor

@CoreNest I agree your issue is very confusing. Please try to use terms from the glossary.

It seems like you're maybe trying to use a single Dear ImGui context to render into multiple places. You should use multiple contexts for this, one for your main viewport and another for your FBO. (IE: Use CreateContext multiple times and SetCurrentContext to switch between them.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants