我正在尝试使用ofxProjectorKinectV2Calibration来校准我的Kinect v2和投影仪。这是对openFrameworks的一个附加,而且设置相对比较复杂。
无论如何,ofxProjectorKinectV2Calibration使用另一个插件ofxSecondWindow来创建第二个窗口来显示棋盘.我的问题是我根本看不见第二个窗口。它甚至没有显示在任务栏上。
下面是来自ofxSecondWindow的代码,用于创建第二个窗口:
void ofxSecondWindow::setup(const char *name, int xpos, int ypos, int width, int height, bool undecorated) {
this->width = width;
this->height = height;
glfwWindowHint(GLFW_DECORATED, !undecorated);
mainWindow = glfwGetCurrentContext();
auxWindow = glfwCreateWindow(width, height, name, NULL, mainWindow);
glfwSetWindowPos(auxWindow, xpos, ypos);
/* enable alpha blending by default */
glfwMakeContextCurrent(auxWindow);
glEnable(GL_BLEND);
#ifndef TARGET_OPENGLES
glBlendEquation(GL_FUNC_ADD);
#endif
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glfwMakeContextCurrent(mainWindow);
hidden = false;
}我确信width和height是正确的,打开或关闭undecorated不会改变任何事情,而glfwCreateWindow确实返回一些不为null的句柄。
环境: Windows 10 64位,Visual 2015 32位构建目标,投影仪(1024x768)显示1,PC屏幕显示2。openFrameworks版本0.9.3,插件:
想法?
发布于 2016-05-31 08:28:41
结果,我不得不在新创建的窗口上调用show(),或者在实现中调用glfwShowWindow。
https://stackoverflow.com/questions/37540095
复制相似问题