GLFW库在多线程中如何分别打开窗口呢?
各位大神好,小弟是刚入手glfw库的菜鸟,想要请教RT
现在有两个线程,在每个线程中,想在每个线程中分别创建一个窗口进行渲染操作
然后在每个线程中,我都写了
// Create a window
if (!(window = glfwCreateWindow(windowWidth, windowHeight, title, NULL, NULL)))
{
cout << "Failed to open window!" << endl;
glfwTerminate();
exit(-1);
}
/* Make the window's context current */
glfwMakeContextCurrent(window);
但是并不成功,只能出现一个窗口在画东西,请问应该怎么做才能达到我的目的呢?