How to run XNA in VirtualBox on Mac?

I know this is weird. XNA version is 3.1 and VirtualBox version is 4.0.2.

+4
source share
3 answers

Install the software help device that comes with the DirectX SDK . For me, this allowed the use of XNA unit tests on a Hyper-V virtual machine. It should do the trick for any virtual environment, since it implements the full DirectX device in software and does not rely on available hardware or virtualized drivers. It will not be swiftly fast, but it should work.

Installing the main parts of the DirectX SDK is sufficient; further installation and configuration are not required.

(almost forgotten) In the code that installs the device, you must indicate the type of device you are using:

var deviceType = (hardwareDevice ? DeviceType.Hardware : DeviceType.Reference); var graphicsDevice = new GraphicsDevice(GraphicsAdapter.DefaultAdapter, deviceType, ...); 

As a side note: in XNA 4.0, the selection of a reference or hardware device is moved to the GraphicsAdapter using the UseReferenceDevice property.

+4
source

I dealt with this in VMware Fusion, which supports DirectX 9c. However, you may have to use the Reach game profile rather than the full HiDef. This can easily be done in the properties window of a game project in Visual Studio.

I hope this helps, but, as dothalchemy says, you want to make sure that there is support!

+1
source

Enable 3D acceleration in accordance with DirectX in VirtualBox 3.0.0 - here is pure joy , and the XNA project will work fine.

0
source

Source: https://habr.com/ru/post/1336374/


All Articles