VirtualBox has the feature that supports 3D acceleration for Linux guest since 2.2 released.To enable this in your Linux guest,first you need to install guest additions from machine->Install guest additions in the guest window.Then open settings of your Linux virtual machine and check the 3D acceleration option.
3d_acceleration

Make sure you have installed graphics drive in host machine.

And now click install compiz and enable 3D effects in the virtual machine.