2011年1月8日星期六

VirtualBox的硬件3D加速

今天要在VirtualBox的Windows客户机下试验一个Vega Prime的例程,打开的时候vbox弹出如下的对话框:


是说要在客户机里面借用宿主机的硬件3D加速,Guest Additions的版本要和vbox的版本一致。我一看Windows状态栏Guest Additions的版本才是2.1.4,而vbox的版本是3.2.8。这个Guest Additions是宿主机里面的/usr/share/virtualbox/VBoxGuestAdditions.iso文件。Ubuntu不断升级vbox,这个ISO文件也更新了,但是客户机里面安装的Guest Additions不会自动更新,所以里面还是很老的版本。需要再装一次。

装完后Vega Prime的例程可以运行了。但是植物大战僵尸里面的硬件3D加速还是不能启用:



 查看了vbox的手册,有这样一段
For Direct3D support in Windows guests to work, the Guest Additions must be installed in Windows "safe mode". Press F8 when the Windows guest is booting and select "Safe mode", then install the Guest Additions. Otherwise Windows' file protection mechanism will interfere with the replacement DLLs installed by VirtualBox and keep restoring the original Windows system DLLs.
原来要在安全模式下装Guest Additions:

 

这样装过之后,植物大战僵尸里面还是不能启用3D加速。就装了一个Supertux 0.1.3,帧率在90以上。但是如果选择OpenGL模式就会崩溃掉:

这至少说明Direct 3D功能在Supertux里面用上了,不然FPS能达到90多吗。

看了下植物大战僵尸的说明书,系统要求是DirectX 8或者以上的版本,用的不是OpenGL。不能3D加速就不能吧,vbox的手册里面说对Windows客户机的3D加速还是试验性的,所以就别指望每个程序都能用了。

没有评论:

发表评论