如何做立体3D与OpenGL的对GTX 560和以后呢?如何做、OpenGL、GTX

2023-09-09 21:16:45 作者:Obsession【强迫症】

我使用的是开源的触觉和3D图形库Chai3D运行在Windows 7上我已经重写了库做3D立体与Nvidia的NVISION。我使用的OpenGL与过剩,并使用glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE | GLUT_STEREO)来初始化显示模式。它的伟大工程上的Quadro显卡,但在GTX560米和GTX 580显卡,它说的像素格式是不支持的。我知道这些显示器能够显示3D的,我知道卡能够呈现它。我试图调整屏幕和其他一切我能想到的分辨率,但似乎没有任何工作。我读过许多地方的立体3D使用OpenGL只能在全屏模式。因此,唯一可能的原因这个错误我能想到的是,我开始在窗口模式下。我将如何强制应用程序启动在全屏模式下3D启用?任何人都可以提供四缓冲立体3D一code例如使用OpenGL对后来的GTX模卡的作品?

I am using the open source haptics and 3D graphics library Chai3D running on Windows 7. I have rewritten the library to do stereoscopic 3D with Nvidia nvision. I am using OpenGL with GLUT, and using glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE | GLUT_STEREO) to initialize the display mode. It works great on Quadro cards, but on GTX 560m and GTX 580 cards it says the pixel format is unsupported. I know the monitors are capable of displaying the 3D, and I know the cards are capable of rendering it. I have tried adjusting the resolution of the screen and everything else I can think of, but nothing seems to work. I have read in various places that stereoscopic 3D with OpenGL only works in fullscreen mode. So, the only possible reason for this error I can think of is that I am starting in windowed mode. How would I force the application to start in fullscreen mode with 3D enabled? Can anyone provide a code example of quad buffer stereoscopic 3D using OpenGL that works on the later GTX model cards?

推荐答案

您遇到什么已经没有技术上的原因,而只是NVIDIA的产品政策。 Quadbuffer立体声被认为是一个专业的特点,所以NVIDIA提供只对自己的Quadro显卡,即使GeForce GPU的会做得一样好。这不是一个新的发展。早在1999年是这样。比如我有(也仍然有)一个的GeForce2超当时的情况。但在技术上,这是非常相同的芯片像在Quadro,唯一的不同是在PCI-ID报告给系统。人们可以诱骗司机以为你有一个的Quadro通过与PCI-ID的修修补补(通过打补丁的驱动程序或通过焊接的附加电阻上显卡PCB)。

What you experience has no technical reasons, but is simply product policy of NVidia. Quadbuffer stereo is considered a professional feature and so NVidia offers it only on their Quadro cards, even if the GeForce GPUs would do it as well. This is not a recent development. Already back in 1999 it was like this. For example I had (well still have) a GeForce2 Ultra back then. But technically this was the very same chip like the Quadro, the only difference was the PCI-ID reported back to the system. One could trick the driver into thinking you had a Quadro by tinkering with the PCI-IDs (either by patching the driver or by soldering an additional resistor onto the graphics card PCB).

3D立体模式Direct3D的黑客已经支持我的GeForce2即可。背面则驱动程序复制的渲染命令,但施加的翻译模型视点和歪斜到投影矩阵。这些天来它实现了一个着色器,多招的RenderTarget

The stereoscopic 3D mode for Direct3D hack was already supported by my GeForce2 then. Back then the driver duplicated the rendering commands, but applied a translation to the modelview and a skew to the projection matrix. These days it's implemented a shader and multi rendertarget trick.

在NVision3D API允许你做块复制图片为特定的眼睛(这是为电影播放器​​和图像浏览器)。但它也可以让你模拟quadbuffer立体声:与其GL_BACK_LEFT和GL_BACK_RIGHT缓冲区创建两个帧缓冲区对象,这些对象绑定和使用,如果他们quadbuffer立体声。再经过渲染你的blit所产生的图像(如纹理)到NVision3D API。

The NVision3D API does allow you to blit images for specific eyes (this is meant for movie players and image viewers). But it also allows you to emulate quadbuffer stereo: Instead of GL_BACK_LEFT and GL_BACK_RIGHT buffers create two Framebuffer Objects, which you bind and use as if they were quadbuffer stereo. Then after rendering you blit the resulting images (as textures) to the NVision3D API.

由于只有短短的50线管理$ C $的c您可以建立一个程序,在两个NVision3D无缝工程,以及quadbuffer立体声。什么NVIDIA确实是没有意义的,他们应该只是停下来,并很好地支持对消费者的GPU quadbuffer立体声的PixelFormats为好。

With only as little as 50 lines of management code you can build a program that seamlessly works on both NVision3D as well as quadbuffer stereo. What NVidia does is pointless and they should just stop it now and properly support quadbuffer stereo pixelformats on consumer GPUs as well.