gpt4 book ai didi

c++ - 带有 DirectX 部分的 Metro 风格应用程序

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:31:32 26 4
gpt4 key购买 nike

Windows 8 API 是否允许我编写将 XAML 用于 UI 并使用 DirectX 呈现 3D 对象的应用程序?假设我正在编写一个 3D 建模应用程序。我想在 XAML 中制作许多对话框和 UI 元素,以及我将使用 DirectX 呈现的单个矩形窗口。我更喜欢使用 C++。这可能吗?

最佳答案

好消息!看来 Windows 8 的发布版本将允许 Metro/XAML 和 DirectX Interop!

This is a common theme that we heard after we released the Developer Preview. Developers like you wanted to combine the high-performance immediate-mode rendering capabilities of DirectX with the rich interactivity, control model, and design-time experience of XAML.

We heard you. With the Consumer Preview, you can now smoothly integrate XAML and DirectX 11 in the same Metro style app to create a fast and fluid experience. For example, you can now create a DirectX game and use XAML to process input, create graphics for heads-up displays and menus, or bind to your app’s data model.

To this end, we added 3 new XAML types to support a broad range of DirectX interop scenarios, each with different capabilities:

  • SurfaceImageSource enables full composition of DirectX content into a XAML app. This allows drawing DirectX content into the XAMLvisual tree, useful for complex image effects, data visualization,and other immediate-mode drawing scenarios.

  • VirtualSurfaceImageSource is used for large-scale virtualized content. This is targeted toward apps that require panning and
    zooming of large content, like maps and document viewers.

  • SwapChainBackgroundPanel targets full-screen, DirectX-focused scenarios. This is great for games and other low-latency, full-screenDirectX apps with a XAML overlay.

Source

看看this msdn page了解更多详情。

根据结果的好坏,您仍然可以选择放弃 Metro 转而使用 WPF,因为 WPF 和 Direct3D 可以互操作。

关于c++ - 带有 DirectX 部分的 Metro 风格应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7971593/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com