在windows + opengl中选择图形设备 [英] Select a graphic device in windows + opengl

查看:537
本文介绍了在windows + opengl中选择图形设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何使用openGL打开一个窗口(使用Win32或其他工具包)。但是当系统有2个显卡时。如何选择要渲染的图形设备?我的编程语言是C ++,我专注于窗口,但任何样品将受欢迎。

I know how to open a window with openGL (using Win32 or other toolkits). But when the system have 2 graphics cards. How do I select a graphic device to render? My programming language is C++ and I'm focusing on windows but any sample will be welcome.

编辑:也许这是一个好主意,以更好地解释我的问题,添加一些透视:我的新笔记本电脑有两个显卡。集成的Intel HD和GeForce GT 540M。英特尔卡大多数时间来渲染SO,因为它节省了电池。当游戏启动时,GeForce会自动启动。该系统由nvidia称为optimus( http://www.nvidia.com/object/optimus_technology.html)。问题是,当我启动我的应用程序,检测到的de opengl驱动程序是2.1,供应商是英特尔,我不知道如何切换到其他设备。

Maybe Its a good idea to explain my problem better, in order to add some perspective: My new laptop have two graphic cards. An integrated Intel HD and a GeForce GT 540M. The intel card works most of the time to render SO, because it save battery. When a game is started, then the GeForce is started automatically. This system is called "optimus" by nvidia ( http://www.nvidia.com/object/optimus_technology.html ). The problem is that when I start my application, de opengl driver detected is 2.1 and the vendor is Intel, and I don't know how to switch to the other device.

最后我发现了这个信息。如果你不使用nvidia,那么它不是太有用,但我可以让任何可以阅读 http://developer.download.nvidia.com/compute/cuda/3_2/toolkit/docs/CUDA_Developer_Guide_for_Optimus_Platforms.pdf

Finally I found this information. It isn't too useful if you are not using nvidia but I let it to any who could read http://developer.download.nvidia.com/compute/cuda/3_2/toolkit/docs/CUDA_Developer_Guide_for_Optimus_Platforms.pdf

推荐答案

我不是100%肯定,但我似乎记得在Windows下这是不可能的,除了在特定屏幕上创建一个窗口。

I am not 100% sure, but I seem to remember that under Windows this is not possible, other than to create a window on a specific screen.

NVidia提供了一个名为 WGL_nv_gpu_affinity 的扩展程序。我不知道这是否仍然可用,是否它的工作,你想要的。

NVidia provided an extension called WGL_nv_gpu_affinity. I'm not sure if this is still available and whether it works as you would like.

编辑

我发现另一个线程,其中包含此PDF 。不是一个满意的答案也许,但至少一些信息。

I see that similar information is already provided in another thread, with an additonal link to this PDF. Not a satisfying answer perhaps, but at least some info.

这篇关于在windows + opengl中选择图形设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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