简体   繁体   English

如何检查GLFW窗口是否正在运行?

[英]How to check if GLFW window is running?

I am creating an app using GLEW and GLFW. 我正在使用GLEW和GLFW创建一个应用程序。 I want to check if my window is still running. 我想检查窗口是否仍在运行。 Is there any way to do this? 有什么办法吗?

int main(void)
{

app = new Application();
while (!glfwWindowShouldClose(app->m_Window))
{
    /* Render here */
    renderer.Clear();

    app->Update();
    app->Render(&renderer, shader);
    glfwSwapBuffers(app->m_Window);

    /* Poll for and process events */
    app->HandleEvents();
}
glfwTerminate();
return 0;
}

After I close the opengl window, the console still runs. 关闭opengl窗口后,控制台仍然运行。

I fixed it. 我修好了它。 I had an infinite loop running in the background(checking for opengl errors). 我在后台运行了一个无限循环(检查opengl错误)。 Thank you for your support! 谢谢您的支持!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM