C ++中具有单个openGL上下文的多个QGLWidget [英] Multiple QGLWidgets with a single openGL Context in C++

查看:103
本文介绍了C ++中具有单个openGL上下文的多个QGLWidget的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个由多个(16-32)绘图组成的应用程序,这些绘图每秒更新几次,并使用openGL绘制.到现在为止,我已经使用GLUT进行了大部分的样机原型设计.但是,我想采用像QT这样的完整框架,并且我准备编写一个测试QGLWidget.............................................................................................................

I'm writing an application that is composed of multiple (16-32) plots that are updated several times a second and are drawn using openGL. Until now I've down most of the prototyping of the plots with GLUT. However I'd like to adopt a full fledge framework like QT and I'm getting ready to write a test QGLWidget.

在开始之前,我想弄清楚多个QGLWidgets是否可以共享一个openGL上下文?如果是这样,那么在小部件之间共享openGL上下文时,我有什么需要跟踪的细节吗?

Before I get started I'd like to figure out if its possible for multiple QGLWidgets to share a single openGL context? If so is there anything specifics I need to keep track of when sharing an openGL context between widgets?

推荐答案

是的,可以使用

如果有的话,我需要在共享时跟踪任何细节 小部件之间的openGL上下文?

If so is there anything specifics I need to keep track of when sharing an openGL context between widgets?

我不确定,但是我认为没有什么需要特别照顾的.

I am not sure, but I don't think there is anything special you need to take care of.

这篇关于C ++中具有单个openGL上下文的多个QGLWidget的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆