SOLVED: OpenGL 3 in windows guest

Discussions about using Windows guests in VirtualBox.
manjaronoob
Posts: 17
Joined: 16. Oct 2020, 00:46

SOLVED: OpenGL 3 in windows guest

Post by manjaronoob »

Is there a way to get support for OpenGL 3 (or higher) in windows 7 guest? Plan is to run sketchup 2017
Using VboxSVGA with 3D acceleration, I get support for OpenGL 2.1
Host: manjaro linux

Edit: Solved by https://fdossena.com/?p=mesa/index.frag
Last edited by manjaronoob on 9. Jan 2021, 06:38, edited 1 time in total.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: OpenGL 3 in windows guest

Post by mpack »

No, there is no way to get OpenGL 3 in a VirtualBox VM at the moment. This is a user self help forum so we can't tell you when the devs might implement that.
manjaronoob
Posts: 17
Joined: 16. Oct 2020, 00:46

Re: OpenGL 3 in windows guest

Post by manjaronoob »

Thanks. That saves me from hours of trying.
Most google results on this subject are dated 2016-2017. As this still is an issue 5 years later, I guess it's not going to be fixed.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: OpenGL 3 in windows guest

Post by mpack »

In fact there has been plenty of movement on VirtualBox graphics capability since 2017, more so than in the entire previous decade.

The basic problem was that the old "VBoxVGA" graphics controller was, by all accounts, an unmaintainable and insecure spaghetti mess. The devs introduced two new graphics controllers in VirtualBox 6.0.0 (Dec 2018, so just a little more than one year ago): VBoxSVGA for Windows guests and VMSVGA for Linux guests.

Of course it's in the nature of development that whenever you start with a blank sheet, you start with a whole new mess of bugs, which the devs have been working their way through in the period since the new features were introduced. For the moment the OpenGL translation layer has not been improved, but who knows what might happen next.
manjaronoob
Posts: 17
Joined: 16. Oct 2020, 00:46

Re: OpenGL 3 in windows guest

Post by manjaronoob »

Thanks for that information.
Wonder if there could be a workaround to run the vm headless and use some kind of remote display that supports opengl 3+
manjaronoob
Posts: 17
Joined: 16. Oct 2020, 00:46

Re: OpenGL 3 in windows guest

Post by manjaronoob »

So, here is how to do it, with windows 7 64bit guest. I guess other windows versions are the same.
Goto https://fdossena.com/?p=mesa/index.frag
Download the version that fits your needs. I tried the latest 64bit version.

Extract opengl32.dll from the downloaded file. Save it in the same folder as the .exe you use to start the program that needs opengl 3 support.

Run the program to see if problem is solved. In my case I wanted to run Sketchup Make 2017 in a virtual machine, as there is no linux version of sketchup, and wine has some issues. The solution worked great for Sketchup.

In terms of performance... I haven't really tested with any large models yet. For the models I've tested, it runs just as smooth as it did on my old windows pc.
manjaronoob
Posts: 17
Joined: 16. Oct 2020, 00:46

Re: SOLVED: OpenGL 3 in windows guest

Post by manjaronoob »

For those who run linux guest, I suggest you have a look at https://mesa3d.org/
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: SOLVED: OpenGL 3 in windows guest

Post by mpack »

I should clarify that my comments above have been implicitly discussing hardware accelerated OpenGL rendering. Mesa is a software renderer, and if that is good enough for your needs then that's great.
manjaronoob
Posts: 17
Joined: 16. Oct 2020, 00:46

Re: SOLVED: OpenGL 3 in windows guest

Post by manjaronoob »

It's way better than not being able to start the program at all.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: SOLVED: OpenGL 3 in windows guest

Post by mpack »

Perhaps. That would very much depend on what the program attempts to do: a purely software renderer is always going to have limited performance, so it limits vertex counts, polygon counts, texture memory etc. In fact it should be obvious that graphics cards would have no reason to exist if it was possible to get the same performance with software alone. Perhaps if Mesa is capable of adding an updated layer over the underlying hardware OpenGL layer then it may still be useful.
manjaronoob
Posts: 17
Joined: 16. Oct 2020, 00:46

Re: SOLVED: OpenGL 3 in windows guest

Post by manjaronoob »

I think everyone who uses desktop virtualization is aware that their virtual machines will have lower performance than if they used the physical machine. Anyone who decide to run software in a vm will need to try if it performs the way they need.
To say it's impossible to run a software that requires opengl 3 in a vm because it will perform less than in the physical machine is like stating that virtualization is in general impossible because of lower performance.
A way better answer to the question of whether it is possible to run software that requires open GL 3 would be to say that it is possible using Mesa, but it's performance may suffer even more than other software run virtually.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: SOLVED: OpenGL 3 in windows guest

Post by mpack »

manjaronoob wrote: To say it's impossible to run a software that requires opengl 3 in a vm because it will perform less than in the physical machine
Who said that? Certainly not me.

In my comments about software GL renderers I said nothing about VMs being a special case.
manjaronoob
Posts: 17
Joined: 16. Oct 2020, 00:46

Re: OpenGL 3 in windows guest

Post by manjaronoob »

mpack wrote:No, there is no way to get OpenGL 3 in a VirtualBox VM at the moment.
mpack wrote:I should clarify that my comments above have been implicitly discussing hardware accelerated OpenGL rendering. Mesa is a software renderer
mpack wrote:a purely software renderer is always going to have limited performance
I read these as you state that there is no way to run Open GL 3 software in VirtualBox VM, because your opinion is that the software solution (that you apparently have quite a bit knowledge of) suffer in performance. What I'm trying to say is that I think it's drastic to say there is no way to do it when you know there is a way, just that you're not happy with that way of doing it.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: SOLVED: OpenGL 3 in windows guest

Post by mpack »

And again, that has nothing to do with anything I said.

(1) You asked if there was a way to get OpenGL 3 in a VM. Since almost everyone who asks that means "how can a VM access faster graphics from my sooper dooper host graphics card" I assumed that this is what you meant as well. Indeed that could have been a bad assumption. In any case I responded in the negative.

(2) You came back saying that the problem had been solved, you had found the Mesa renderer which does present an OpenGL 3+ API.

(3) I pointed out that Mesa is a software renderer, hence it will not give you accelerated graphics (unless it renders to an existing OpenGL layer). Note that this statement is true regardless of whether Mesa is run in a VM or a physical PC. It is somewhere here that your logic has gone awry.

I have not really followed the sense of your comments since then. At each stage I have stated facts, not opinions: whether or not I "like" software renderers is irrelevant.
mattp1086
Posts: 1
Joined: 21. Jan 2021, 00:00

Re: SOLVED: OpenGL 3 in windows guest

Post by mattp1086 »

Was trying to get Amplitube (software guitar amp) running on a Windows 10 guest in VirtualBox. Since it requires more than OpenGL 1 to render the interface, all I got was a black screen. Putting the opengl dll into its application folder solved the problem.

Obviously, software 3d rendering isn't going to work for graphically intense games, but for apps that are just rendering old Fender amps on the screen, it's perfectly fine!

Many thanks for the suggestion. Looking forward to 3d acceleration that actually works in VirtualBox though.
Locked