C ++ Directx 11多个视频卡 [英] C++ Directx 11 Multiple Video Cards

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

问题描述

我正在使用Directx 11为我的图形编写C ++程序。我的笔记本电脑有一个重量轻的英特尔图形卡,该卡可用于延长电池寿命,并且只能用于重量轻的图形卡。我还安装了另一个功能更强大的视频卡。

I am writing a program in C++ using directx 11 for my graphics. My laptop has a light weight intel graphics card that is used to extend my battery life and is supposed to only be used for "lightweight" graphics. I have another much more powerful video card installed also.

我想知道如何指定在DirectX中使用哪个视频卡?创建设备时可以指定在代码中使用哪个卡吗?

I am wondering how to specify which video card to use in directx? Is there a way when I am creating the device to specify which card to use within my code?

谢谢

推荐答案

如果您的卡是某些intel / nvidia组合,则有两种选择:

If your card is some intel/nvidia combination, you have two options:

-首先将nvidia卡设置为首选设备(在nvidia控制面板中,管理3d设置,全局/程序设置,更改首选的图形处理器。

-First is set the nvidia card as prefered device (in nvidia control panel, manage 3d settings, Global/Program settings, change the preffered graphics processor.

使用代码的另一种方法是使用DXGI枚举适配器,以及尝试获取功能级别受限制的设备(如果无法使用,则CreateDevice将失败,并且大多数intel卡为10.1)

Another way using code, is to enumerate adapters with DXGI, and try to get device with restricted feature level (CreateDevice will fail if not available, and most intel cards are 10.1)

http://msdn.microsoft.com/zh-CN/library/windows/desktop/ bb174538(v = vs.85).aspx 来枚举适配器。

然后尝试仅为每个适配器创建带有D3D_FEATURE_LEVEL_11_0的设备将被创建。

Then try to create device with D3D_FEATURE_LEVEL_11_0 only for each adapter, only the one supporting it will be created.

这篇关于C ++ Directx 11多个视频卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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