[GLFW][OPENGL3] Runtime Error when setup 2 glfw window with dear imgui frame on it #6291
binaryfox0
started this conversation in
Build/Link/Run issues ONLY!
Replies: 1 comment
-
Try to guess what the assert means and press Retry to find the code location and guess what it means. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am a Junior Developer, and use ImGui for simple text editor. When I do a save dialog from opengl in a new window of glfw (not in main window). Compile isnt have any error but when run it runtime error appear
Here is my code
`// Main window (first window)
window[1] = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+OpenGL3 example", NULL, NULL);
if (window == NULL)
return 1;
glfwMakeContextCurrent(window[1]);
glfwSwapInterval(1); // Enable vsync
// Dialog call
if(isDialogCall == true)
{
If dialog is call it will be create second window
window[2] = glfwCreateWindow(1280, 720, "File Explorer", NULL, NULL);
}
// Main frame of first window ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize);
auto cpos = editor.GetCursorPosition();
ImGui::Begin("Text Editor Demo", nullptr, ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoTitleBar);
if (ImGui::BeginMenuBar())
{
if (ImGui::BeginMenu("File"))
{
if (ImGui::MenuItem("Save"))
{
// Editor code here
}
if (ImGui::MenuItem("Quit", "Alt-F4"))
break;
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Edit"))
{
//Editor code here
}
Beta Was this translation helpful? Give feedback.
All reactions