在Qt线程中应用OpengGL着色器

Applying OpengGL Shader in Qt Thread

本文关键字:OpengGL 应用 Qt 线程      更新时间:2023-10-16

我在线程中将着色器添加到OpenGL窗口时遇到问题。

代码在这里:https://github.com/odie42/qtopengl

它似乎加载了着色器等,但没有更新缓冲区或其他东西。我不知道为什么不显示着色器/几何体。

//编辑

我实际上找到了一个解决方案。如果有人感兴趣,我会上传工作代码。

您需要"移动"opengl 上下文,如下所述: http://www.opengl.org/wiki/OpenGL_and_multithreading