3D Acceleration Support

This is for discussing general topics about how to use VirtualBox.
Locked
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: 3D Acceleration Support

Post by Technologov »

I decided to update first page according to current progress.

This topic is better to stay opened.
HalNineThousand
Posts: 11
Joined: 22. Feb 2009, 18:46

Re: 3D Acceleration Support

Post by HalNineThousand »

I've read through this thread, but since I've never done much with 3d or graphics programming, and since I'm not as up with all the products as many seem to be, I'm still a little confused. Could someone please update me by verifying where I'm right or wrong with a few statements and by answering a few questions?

1) From what I see, VB now supports OpenGL, but not all versions. VB does not support DirectX at this point. Is this correct?

2) I don't recall if it was here or elsewhere, but I've seen references or indications that it is possible for OpenGL to emulate or replace DirectX, but apparently not DirectX 9 and above unless you use a later version of OpenGL, which does not yet run on VB. Again, is this correct?

3) I looked at the OpenGL site, but can't find a download for just plain OpenGL. I see a lot of applications or games I can download, but no link for just plain OpenGL. Why is this and where can I download a version of OpenGL for my XP guest system?

I have both Mac and Linux host machines and the only game (other than simple things like Othello) that I like playing is Myst -- and all the sequels to it. I found the issue with these games is, obviously 3d Acceleration.

Is there any way to use OpenGL to do the work for DirectX so I can use Myst, which requires 3d Aceleration (I'm using RealMyst, not Myst, but I'm using the first version for each game after that)?

I know some of this has been discussed, but I'm having trouble being sure just exactly what can and can't work now and what I'd need to do (if it's possible) to get 3D acceleration for these games.

Thanks for any help in understanding and clarifying this!
ajmas
Posts: 79
Joined: 27. Jan 2009, 19:37
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Ubuntu
Location: Olympus Mons Colony, Mars

Re: 3D Acceleration Support

Post by ajmas »

WineD3D provides support for Direct3D. The problem is that a change in VirtualBox 2.2.x broke that support and we are unlikely to see it restored until 2.3.x. For reference:

http://www.virtualbox.org/ticket/3762
VB version: 6.x Primary OS: MacOS X 11.0.1 on Intel Mac
HalNineThousand
Posts: 11
Joined: 22. Feb 2009, 18:46

Re: 3D Acceleration Support

Post by HalNineThousand »

ajmas wrote:WineD3D provides support for Direct3D. The problem is that a change in VirtualBox 2.2.x broke that support and we are unlikely to see it restored until 2.3.x. For reference:

http://www.virtualbox.org/ticket/3762
So if I can find a version before 2.2.x, then I can use WineD3D with OpenGL and it'll do 3D acceleration? If so, where can I download an earlier version?

Do I still need to download OpenGL? That's what confuses me -- I just can't find a link to download only OpenGL without games or apps.

Thanks!
ajmas
Posts: 79
Joined: 27. Jan 2009, 19:37
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Ubuntu
Location: Olympus Mons Colony, Mars

Re: 3D Acceleration Support

Post by ajmas »

OpenGL is part of VirtualBox, you just need to be sure you have enabled the "3D support" option and have a physical 3D card that has OpenGL support.
VB version: 6.x Primary OS: MacOS X 11.0.1 on Intel Mac
HalNineThousand
Posts: 11
Joined: 22. Feb 2009, 18:46

Re: 3D Acceleration Support

Post by HalNineThousand »

Okay. I'm using 2.2.2 and thought I'd give it a try, since there seemed to be an issue with reproducing the problem in some cases (or so it seemed to me), but it's not working for me on that version. It installed okay, DXDiag said I had 3D acceleration, but when I ran Myst, it said there was no suitable rendering device. (And I did have 3d enabled in the settings.) I tried running DXDiag again and clicked the Test button to test 3D acceleration and the VM crashed -- and won't start again. Each time I start it, it aborts. That's not a huge loss, it just means I need to re-install WinXp.

I did get Myst to work on Parallels on my iMac, but I would much rather use VB, in part because then I know I can use it on my Linux box as well (which is hooked up to my TV, in a more comfortable location). I figure if I can get it working on my iMac, I can get it to work on Linux, too.

Any idea where I can download a version of VB that's pre-2.2 so I can use it for this? It's going to be a long while before I use a VM for anything serious and won't be using the networking on the WinXP guest, so I'm fine with an older version just for a game.

Again, thanks!
wswartzendruber
Posts: 46
Joined: 18. Dec 2008, 03:28
Primary OS: Linux other
VBox Version: PUEL
Guest OSses: Gentoo Linux, Windows 7
Location: California, USA
Contact:

Re: 3D Acceleration Support

Post by wswartzendruber »

Has anyone successfully played Direct3D games under VirtualBox 3.0 Beta?
mrproper
Posts: 11
Joined: 18. Jun 2009, 18:32
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: xp, seven, ubuntu...

Re: 3D Acceleration Support

Post by mrproper »

Virtualbox 3.0 beta 1 now offers 3D support. You need to configure your VM and enable the 3D option in Display, and re-install the Vbox additions in the guest OS, and manually selecting to install 3D support.

So far I tried the screensavers and CS1.6 :)
HalNineThousand
Posts: 11
Joined: 22. Feb 2009, 18:46

Re: 3D Acceleration Support

Post by HalNineThousand »

mrproper wrote:Virtualbox 3.0 beta 1 now offers 3D support. You need to configure your VM and enable the 3D option in Display, and re-install the Vbox additions in the guest OS, and manually selecting to install 3D support.

So far I tried the screensavers and CS1.6 :)
Is that regular 3D, or does it include 3d Acceleration?
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: 3D Acceleration Support

Post by Technologov »

3D Acceleration. But experimental. (unstable)
HalNineThousand
Posts: 11
Joined: 22. Feb 2009, 18:46

Re: 3D Acceleration Support

Post by HalNineThousand »

Technologov wrote:3D Acceleration. But experimental. (unstable)
So how unstable and when is 3.0 expected to go gold?

I was thinking if it won't be too long (like a year or more) and it does what I want with the Myst games, then once I see proof it works, I don't mind waiting a bit if I see it does what I want. It beats paying for a closed source VM and I also know I have a solution that will work on both OS X and Linux.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Re: 3D Acceleration Support

Post by Technologov »

>So how unstable and when is 3.0 expected to go gold?

VirtualBox has no problem including 3D Acceleration in 3.0 final release, because it will be disabled by default.

-Technologov
hiippi
Posts: 3
Joined: 22. Jun 2009, 05:54
Primary OS: MS Windows Vista
VBox Version: PUEL
Guest OSses: Ubuntu, XP

Re: 3D Acceleration Support

Post by hiippi »

Just a quick toss in 'ere...
-----------
First thing, getting normal graphic card access. At this point the device driver will communicate with the default graphic card driver by getting the direct interface IO's etc for the card.

Second, when VBox VM app is started, the device will get the amount of video memory and change the available memory amount for the Host OS to be viewed as the set amount (or, alternatively, limiting the access to RAM higher than the amount set available).

Third, when Guest VM is starting, its BIOS will be linking the appropriate interface (PCI-e, AGP, similar) to the Guest VM and dedicate the new virtual /dev to this interface. For this, we need the RAW access to the adapter, and as such, all commands _must_ be pushed from Guest

OS without interpreting them (and thus changing the outcome) and without using the real /dev DRIVERS. however, we need the IO etc access for the REAL _device_ itself. This might require changing the nvidia community reverse engineered drivers etc to provide RAWDump methods etc.

Fourth, we get the outcome back to a new "fake" display, to which it is said to be rendered to. (multiple displays, OS doesnt know the difference... the card might, but with current SLI's etc, it can be said to "render to this port", instead of its normal DVI outputs etc.)

Fifth. we push the data from this fake display back to the Host OS display/monitor. Host OS will think nothing strange is going on, since its BIOS will restrict all data transfer as being restricted from the Host OS. (As OS is not able to access entire board architecture, only the readable sections... not micro controllers etc)

The following devices will have to be created/adjusted to do this... 1)"fake video" 2) "fake display" 3) current graphic drivers to support RAW dumping directly to the device, OR, alternatively, just getting the IO, Addresses etc to push material to 4) VBox 5) VBox BIOS files

This means a huge lot of testing, sweat, tears, cussing and coffee... but, it would solve some of the issues by acting as a "reliable" wrapper for the future (no more need to update code to support separate versions of SM's etc, as long as they are supported by the "real" hardware...)

Pros :
-improved access to native graphics, thus speed and feature improvements.

Cons :
-a lot of work
-possible security risk due to access to graphics adapter via wrapper with RAW dumping...
--------------
just a quick dump/bump... Didn't initially find this thread due to FF being stuck on search page and being up for the 29th hour again... Anyway, ignore typos etc, and consider this just as an approach method to possibly solving the issue. I bet there are a ton similar "solutions" noted, however, not implemented as far as I've noted...
pchev
Posts: 2
Joined: 25. Jun 2009, 13:34
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: windows

Re: 3D Acceleration Support

Post by pchev »

wswartzendruber wrote:Has anyone successfully played Direct3D games under VirtualBox 3.0 Beta?
Yes, I just install 3.0 beta2 and successfully run "Rise of nation" on a XP VM under Kubuntu Jaunty, ATI 3850 with Catalyst 9.6.

The difficult part was to let XP accept the changed d3d8.dll and d3d9.dll, it always silently restore the original version until I run the guest addition installer in safe mode.
After that it pass the dxdiag direct3d 8 and 9 test and the game work flawlessly.
HalNineThousand
Posts: 11
Joined: 22. Feb 2009, 18:46

Re: 3D Acceleration Support

Post by HalNineThousand »

pchev wrote:The difficult part was to let XP accept the changed d3d8.dll and d3d9.dll, it always silently restore the original version until I run the guest addition installer in safe mode.
After that it pass the dxdiag direct3d 8 and 9 test and the game work flawlessly.
I'm not familiar with d3d8.dll. I understand about using wined3d, but what is the deal with d3d8.dll -- and in this case, with the "guest addition" installer, is that a reference to the VirtualBox virtual CD to install in a guest VM?

In other words, could I get some clarification on just what this means, please?
Locked