多显示器 3D 应用

发布于 2024-08-17 03:31:26 字数 145 浏览 13 评论 0原文

我面临着一个 C++ 3D 应用程序项目的挑战,该项目将使用 3 个显示器,每个显示器都从不同的相机进行渲染。

最近我了解了Ogre3D,但不清楚它是否支持不同相机输出到不同显示器/GPU。

有没有人有类似的设置和 Ogre 或其他引擎的经验?

I've been challenged with a C++ 3D application project that will use 3 displays, each one rendering from a different camera.

Recently I learned about Ogre3D but it's not clear if it supports output of different cameras to different displays/GPUs.

Does anyone have any experience with a similar Setup and Ogre or another engine?

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

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

发布评论

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

评论(2

情痴 2024-08-24 03:31:26

至少在大多数系统(例如,Windows、MacOS)上,窗口系统创建虚拟桌面,其中不同的显示器映射到桌面的不同部分。如果您愿意,您可以(例如)创建一个大窗口来覆盖所有三个显示器。如果你将该窗口设置为使用 OpenGL,几乎任何使用 OpenGL 的东西(几乎肯定包括 Ogre3D)都可以正常工作,尽管在某些情况下,产生如此高的输出分辨率可能会对显卡造成负担,以至于比平常慢一点。

如果您想在每个显示器上处理单独的窗口,事情可能会更复杂一些。 OpenGL 本身并不(甚至试图)定义如何处理多个窗口中的显示——这取决于特定于平台的函数集。例如,在 Windows 上,每个窗口都有一个渲染上下文,并且必须使用 WGLMakeCurrent 来选择在任何给定时间绘制到的渲染上下文。

如果没记错的话,Ogre3D 的 Windows 端口支持多个渲染上下文,所以这也应该不是问题。我希望它也可以与其他系统上的多个窗口一起使用,但我没有在任何其他系统上使用过它,所以我不能肯定地说。

然而,我的直接猜测是,三显示器支持在您的整体开发工作中几乎无关紧要。当然,这确实意味着您(可以告诉您的老板)需要三重显示器设置来进行开发和测试,这当然不是一件坏事! :-)

编辑:OpenGL 本身没有指定任何有关全屏窗口与普通窗口的信息。如果没记错的话,至少在 Windows 上要获得全屏应用程序,您可以将 ChangeDisplaySettingsCDS_FULLSCREEN 结合使用。之后,它基本上将整个虚拟桌面视为单个窗口。不过,我不记得曾在多台显示器上做过这样的事情,所以我不能肯定地说太多。

At least on most systems (e.g., Windows, MacOS) the windowing system creates a virtual desktop, with different monitors mapped to different parts of the desktop. If you want to, you can (for example) create one big window that will cover all three displays. If you set that window up to use OpenGL, almost anything that uses OpenGL (almost certainly including Ogre3D) will work just fine, though in some cases producing that much output resolution can tax the graphics card to the point that it's a bit slower than usual.

If you want to deal with a separate window on each display, things might be a bit more complex. OpenGL itself doesn't (even attempt to) define how to handle display in multiple windows -- that's up to a platform-specific set of functions. On Windows, for example, you have a rendering context for each window, and have to use WGLMakeCurrent to pick which rendering context you draw to at any given time.

If memory serves, the Windows port of Ogre3D supports multiple rendering contexts, so this shouldn't be a problem either. I'd expect it can work with multiple windows on other systems as well, but I haven't used it on any other systems, so I can't say with any certainty.

My immediate guess, however, is that the triple monitor support will be almost inconsequential in your overall development effort. Of course, it does mean that you (can tell your boss) need a triple monitor setup for development and testing, which certainly isn't a bad thing! :-)

Edit: OpenGL itself doesn't specify anything about full-screen windows vs. normal windows. If memory serves, at least on Windows to get a full screen application, you use ChangeDisplaySettings with CDS_FULLSCREEEN. After that, it treats essentially the entire virtual desktop as a single window. I don't recall having done that with multiple monitors though, so I can't say much with any great certainty.

逐鹿 2024-08-24 03:31:26

关于 OGRE3D 的多头支持,有几件事需要说明。根据我的经验,一个可行的解决方案是使用 Ogre 1.6.1 的源版本并应用 此补丁
使用此补丁,用户已成功在 上渲染 Ogre 应用程序6 个显示器配置

就我个人而言,我已经成功应用了这个补丁,并将其与 StereoManager 插件,用于将 Ogre 应用程序与 3D 投影仪连接起来。我只使用 Direct3D9 后端。 StereoManager 插件附带了一个修改后的演示 (Fresnel_Demo),它可以帮助您设置第一个多头应用程序。

我还应该补充一点,从 1.7 版本开始,多头补丁现在是 Ogre 核心的一部分。 Ogre1.7 最近作为 RC1 发布,因此这可能是让它工作的最快、最简单的方法。

There are several things to be said about multihead support in the case of OGRE3D. In my experience, a working solution is to use the source version of Ogre 1.6.1 and apply this patch.
Using this patch, users have managed to render an Ogre application on a 6 monitors configuration.

Personnaly, I've successfully applied this patch, and used it with the StereoManager plugin to hook up Ogre applications with a 3D projector. I only used the Direct3D9 backend. The StereoManager plugin comes with a modified demo (Fresnel_Demo), which can help you to set up your first multihead application.

I should also add that the multihead patch is now part of the Ogre core, as of version 1.7. Ogre1.7 was recently released as a RC1, so this might be the quickest and easiest way to have it working.

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