Jump to content

  • Log In with Google      Sign In   
  • Create Account


Developing software using OpenGL on an OS in a VM?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
15 replies to this topic

#1 Krankles   Members   -  Reputation: 281

Like
0Likes
Like

Posted 11 February 2013 - 05:18 PM

Hi, I'm trying to learn OpenGL 3 and 4, and I ran into a problem, I can't use the latest GLSL and OpenGL. Reason for this is because I don't have my graphics drivers installed on my system, which is Arch Linux. However, it's because running in a VM (VirtualBox, in my case), you can't install graphics drivers. The host OS is Windows 7 and the Guest OS is Arch Linux. So what I've done is install the latest Mesa 3D, which is Mesa 9.0.2.

 

I've made a thread about a problem not being able to draw a simple triangle in Linux. http://www.gamedev.net/topic/638573-opengl-cant-draw-a-triangle-no-error-either/ Although fixed now, the solution wasn't really what I wanted, I want to use the recent and better version of GLSL and OpenGL, instead of the old 1.20 GLSL. The vertex shader and fragment shader files had to be changed and for some odd reason I couldn't use the code "glEnableVertexAttribArray" and "glVertexAttribPointer". I had to use "glEnableClientState" and "glVertexPointer", which are for fixed function pipeline, which I didn't want to learn. I want to learn the programmable function pipeline.

 

So basically, what I'm asking is, is it possible to continue developing opengl applications in a VM? If so, how? (Since Mesa only supports the OpenGL 3.1 specification, as shown here http://mesa3d.org/faq.html) Or would I really have to install Arch Linux onto my hard drive with dual boot and install my graphic drivers?

 

Thanks.



Sponsor:

#2 smr   Members   -  Reputation: 1552

Like
0Likes
Like

Posted 11 February 2013 - 05:59 PM

Personally I would just install your dev environment on the bare metal and call it a day.

I use virtualbox daily but it does lag behind Parallels and maybe even VMware in its hardware graphics support.

#3 Krankles   Members   -  Reputation: 281

Like
0Likes
Like

Posted 11 February 2013 - 06:50 PM

Yeah, I was afraid of that, oh well, virtualbox was sort of slow too :P When I tested out my pong clone, it ran a bit slow/sluggish, whereas if I compiled and ran it on windows, it would run smoothly. (Even though both of it was capped at 60 fps)

 

Anyways, thanks for the input, I guess I'll just install Arch Linux on my hard drive and do the dual boot.



#4 Martins Mozeiko   Crossbones+   -  Reputation: 1413

Like
0Likes
Like

Posted 11 February 2013 - 06:57 PM

Did you have installed virtualbox guest additions in VM? Guest additions improve performance of VM significantly. Also it provides proper 3D acceleration to guest OS: http://www.virtualbox.org/manual/ch04.html#guestadd-3d



#5 Krankles   Members   -  Reputation: 281

Like
0Likes
Like

Posted 11 February 2013 - 07:34 PM

Yeah, I had guest additions installed. Unfortunately, that's all I can do though, I can't really install any graphics drivers. My rig isn't even horrible either, CPU is i7-2700k @ 3.50GHz (4 cores 8 threads), 16 GB of RAM, and NVIDIA GeForce GTX 680. Gave the guest 4 GB and 2 cores.

 

It's fine though, I'll just do the dual boot. Unless someone knows a way to somehow develop opengl applications in a VM.



#6 TheChubu   Crossbones+   -  Reputation: 3698

Like
0Likes
Like

Posted 11 February 2013 - 09:23 PM

I'd try with VMWare Player.

 

As far as I know, they have better support for graphics than VirtualBox and VMWare collaborates with Mesa developers themselves. You won't get more than OpenGL 3 out of mesa (software emulation), and I think VMWare video driver supports (accelerated) OpenGL 2.1 only.

 

Though it may be better just to install Arch and be done with it.


Edited by TheChubu, 11 February 2013 - 09:29 PM.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#7 Promit   Moderators   -  Reputation: 6077

Like
0Likes
Like

Posted 11 February 2013 - 09:33 PM

Hilariously enough, the VMs that accelerate 3D usually accelerate D3D but not OGL for Windows. Why are you running the virtualized setup in the first place?


Edited by Promit, 11 February 2013 - 09:33 PM.


#8 Krankles   Members   -  Reputation: 281

Like
0Likes
Like

Posted 11 February 2013 - 09:45 PM

Hilariously enough, the VMs that accelerate 3D usually accelerate D3D but not OGL for Windows. Why are you running the virtualized setup in the first place?

 

For the ease of use, so that I can run Windows and Linux at the same time, and that I don't have to restart my computer. I can just turn on the VM instantly AND I can chat to some friends since I play games on Windows on Steam. Going to OGL, I'm forced to develop on Windows (which I loathe doing) or I do the dual boot, have to restart my computer and lose the ability to talk to friends on Steam at the same time. (I usually leave the VM in the background too so I can quickly do programming or play games) Or I could buy and build my own computer again (or just one from a shop) and install it on there, but again, not willing to dish out some cash just for this.

 

However, once Steam on Linux comes out I'd be happy to switch completely from Windows to Linux. But in the mean time, I have to stay with Windows.


Edited by Krankles, 11 February 2013 - 09:47 PM.


#9 TheChubu   Crossbones+   -  Reputation: 3698

Like
0Likes
Like

Posted 11 February 2013 - 09:53 PM

That is one thing that I look forward in future computers. To make switching OSes less annoying, ie, make getting into the boot menu faster and simpler.


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#10 Shannon Barber   Moderators   -  Reputation: 1355

Like
0Likes
Like

Posted 11 February 2013 - 10:49 PM

Switch to VMWare/VMPlayer if you want accelerated graphics in a VM.

 

You can download a trial for free, setup your VM, then switch to the player after 30 days and keep using it.


Edited by Shannon Barber, 11 February 2013 - 10:50 PM.

- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

#11 Krankles   Members   -  Reputation: 281

Like
0Likes
Like

Posted 12 February 2013 - 06:30 AM

Switch to VMWare/VMPlayer if you want accelerated graphics in a VM.

 

You can download a trial for free, setup your VM, then switch to the player after 30 days and keep using it.

 

Will I be able to develop OpenGL applications? Will it support higher versions of GLSL instead of Mesa's 1.20 GLSL version? Because this is the only reason I'm sort of forced to stop using VM's, to stop using Mesa and having to install a real graphics card driver.



#12 Karsten_   Members   -  Reputation: 1446

Like
0Likes
Like

Posted 12 February 2013 - 06:53 AM

The only VM I have found that does OpenGL well is the Android Emulator (based on QEMU).
But even this has issues.

Hopefully one day we will have decent 3D passthrough but at the moment it is all very experimental and/or slow and buggy.

So this is one area where duel booting is still the best way for Linux and Windows dev.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#13 Sik_the_hedgehog   Crossbones+   -  Reputation: 1483

Like
0Likes
Like

Posted 12 February 2013 - 07:03 AM

However, once Steam on Linux comes out I'd be happy to switch completely from Windows to Linux. But in the mean time, I have to stay with Windows.

Steam for Linux is out (albeit in beta), the problem is that it needs more games =P (although seems to be getting games at a faster pace than its Mac counterpart)

 

As for the actual topic: yeah, you won't get what you want with a virtual machine, the most you can get is VMWare and OpenGL 2 if I recall correctly (short of using a software renderer, which is what Mesa would do). Either dual boot or get a second computer and install Linux on it (in the latter case you could try to connect the computers so that somehow they can share the files without much problem, which would be probably much faster for debugging than dual boot - no idea what options are out there though).


Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#14 smr   Members   -  Reputation: 1552

Like
0Likes
Like

Posted 12 February 2013 - 08:01 AM

It may be possible to set up dual boot and run your windows install as a guest while you are booted into Linux. This is fairly simple with Mac OS X and parallels. I wonder if anyone has accomplished it with virtualbox Linux and windows.

#15 swiftcoder   Senior Moderators   -  Reputation: 9584

Like
0Likes
Like

Posted 12 February 2013 - 11:50 AM

Your options are pretty much to install linux directly on the metal, or suck it up and develop on Windows.

 

I honestly recommend the latter - graphics driver support in Linux, while worlds better than it was a few years back, is still a rather sore point...

 

I wonder if anyone has accomplished it with virtualbox Linux and windows.


It's a pretty normal thing to do. We used this to access various Windows-centric network services at my previous employer.

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#16 Sik_the_hedgehog   Crossbones+   -  Reputation: 1483

Like
0Likes
Like

Posted 12 February 2013 - 02:50 PM

I honestly recommend the latter - graphics driver support in Linux, while worlds better than it was a few years back, is still a rather sore point...

At least with Nvidia hardware it's way more than bearable (provided you accept using the proprietary drivers), Optimus shenanigans aside (shouldn't be an issue otherwise). If you have other hardware you're pretty much screwed though (your mileage may vary in that case).


Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS