Hidden main OpenGL window whilst ImGui Windows are visible
This commit is contained in:
parent
8532f4b740
commit
0fdaa20aae
@ -56,7 +56,7 @@ int main(int, char**)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Create window with graphics context
|
// Create window with graphics context
|
||||||
GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+OpenGL3 example", NULL, NULL);
|
GLFWwindow* window = glfwCreateWindow(1, 1, "Application Name", NULL, NULL);
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
return 1;
|
return 1;
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
@ -111,6 +111,9 @@ int main(int, char**)
|
|||||||
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
|
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
|
||||||
static char buf[128] = "Hello, World!";
|
static char buf[128] = "Hello, World!";
|
||||||
|
|
||||||
|
//Hide the main window but Keep ImGui windows open
|
||||||
|
glfwHideWindow(window);
|
||||||
|
|
||||||
// Main loop
|
// Main loop
|
||||||
while (!glfwWindowShouldClose(window))
|
while (!glfwWindowShouldClose(window))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user