OpenGL 远程崩溃

当遇到OpenGL远程崩溃的问题时,EnumDisplayDevices函数可能提供解决方案。该函数用于查询当前会话的所有显示设备,通过循环调用,从iDevNum=0开始,直到函数返回失败。DISPLAY_DEVICE结构中的DISPLAY_DEVICE_ATTACHED_TO_DESKTOP标志标识桌面所连接的显示设备。此外,通过设置lpDevice参数,可以获取显示器适配器和显示器监视器的相关信息。
摘要由CSDN通过智能技术生成
公司的程序用OpenGL写的,本地运行良好,但是一远程就出各种问题,找了好久一直没有结果,后来在微软的官方论坛,某个小角落发现了有哥们也遇到这种问题,原来,OpenGL程序在Remote Desktop中崩溃是个硬伤,有人推荐用VirtualGL,不过

EnumDisplayDevices function貌似可以缓解下这个问题。

http://msdn.microsoft.com/en-us/library/dd162609(v=vs.85).aspx

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. The function fails if iDevNum is greater than the largest device index.

Remarks

To query all display devices in the current session, call this function in a loop, starting with iDevNum set to 0, and incrementing iDevNum until the function fails. To select all display devices in the desktop, use only the display devices that have the DISPLAY_DEVICE_ATTACHED_TO_DESKTOP flag in the

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值