当同时开启两个opengl窗口然后关闭的时候,程序总是输出:
Texture is not valid in the current context.
Texture has not been destroyed
解决这样的问题可以在继承QOpenGLWidget的窗口的析构函数中加入makeCurrent();
本文解决在同时使用两个OpenGL窗口并关闭时出现的“Textureisnotvalidinthecurrentcontext”和“Texturehasnotbeendestroyed”错误。通过在QOpenGLWidget的析构函数中调用makeCurrent()来修复上下文问题。
当同时开启两个opengl窗口然后关闭的时候,程序总是输出:
Texture is not valid in the current context.
Texture has not been destroyed
解决这样的问题可以在继承QOpenGLWidget的窗口的析构函数中加入makeCurrent();
645
5200
4161

被折叠的 条评论
为什么被折叠?
