使用 Open GL 在 Qt 中实现立体声

发布于 2024-08-07 17:38:57 字数 470 浏览 11 评论 0原文

我正在尝试在 Qt 中制作立体窗口。我似乎迷失在Qt和OpenGL的交互中。

我已经在 GL 初始化代码中设置了立体上下文

QGLFormat fmt
fmt.setStereo(true)

,当我检查该值时,它返回 true。

然后,我绘制到 GL_BACK_LEFTGL_BACK_RIGHT 缓冲区(我也尝试过 GL_LEFTGL_RIGHT),但结果场景包含两组多边形。

我知道我的硬件(NVIDIA Quadro FX 3500)支持窗口中的立体声,因为其他应用程序(我没有源代码)工作正常。

这种症状是否对任何人来说都很熟悉,以至于很明显我犯了多么愚蠢的错误?

Windows XP、Qt 4.4.2、MS Studio 2005

I am trying to make a stereo window in Qt. I seem to be lost in the interaction of Qt and OpenGL.

I have set the stereo context in my GL initialization code

QGLFormat fmt
fmt.setStereo(true)

and when I check the value, it comes back true.

I then draw into the GL_BACK_LEFT and GL_BACK_RIGHT buffers (I have also tried just GL_LEFT and GL_RIGHT) but the resultant scene contains both sets of polygons.

I know that my hardware (NVIDIA Quadro FX 3500) supports stereo in a window, since other applications (for which I do not have source code) work fine.

Does this symptom seem familiar to anybody, enough so that it might be obvious what stupid mistake I am making?

Windows XP, Qt 4.4.2, MS Studio 2005

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

木緿 2024-08-14 17:38:57

它永远不会失败。
提出问题,并在寻求帮助后几分钟内找到答案。哦,好吧,希望其他人可能会受益。

我正在这样做,

fmt.setStereo(true)

setFormat(fmt);

现在不是这样,它似乎更像我想要的那样。

It never fails.
Ask a question, and figure out the answer within minutes of asking for help. Oh well, hopefully somebody else might benefit.

I was doing this

fmt.setStereo(true)

but not this

setFormat(fmt);

now it seems to work more like I want to to.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文