Running OF in Virtual machine

Hello,

Yesterday I tried to install OF on a Virtual machine. My thoughts behind this are: if I can compile my projects on the same machine but for different OS, it would be great :).

I am on osx 10.7 and I installed windows Xp 32 bit (that is the only legit version I have :slight_smile: ) on it.
Then installed code blocks and OF0073 following instructions on the website.

I tried to run basic examples, it compiles fine but when it runs them, the application crashes: it doesn’t even show OF windows, only the console.

So I am wondering if:

  1. Is this possible to do after all? I don’t see why it shouldn’t be :).
  2. Are there some tricks to know about that? (I am very not familiar with Virtual machine)

Cheers!

just guessing but did you enabled 3d acceleration in your vm ?

check that on your VM’s hardware configuration

I enabled it but the problem is still the same. Also I updated windows update as much as I can but it didn’t help either.

I am using VirtualBox by the way.

Hi, this is my first post, totally new to OF.

I have the same issue.

I can compile, but the executables (projectGenerator and examples) fail to run (segmentation fault).

Why OpenFrameworks in a VM?
I would like to teach C++ using OF. A VM makes it trivial to provide the students a homogeneous development environment that works.

System Specs

  • Virtualbox 4.2.12 (3D acceleration enabled, 128MB graphics memory)

  • Guest OS: Ubuntu 12.04 32bit (also tried on Ubuntu 13.04 64bit)

  • OpenFrameworks: of_v0.7.4_linux_release.tar.gz (also tried the 64bit version on the 64bit OS as well as the tip from GitHub)

Some insights

Output of a failing executable (Compiled using make. Also tried Codeblocks):

  
  
~/projects/openFrameworks_v0.7.4_linux64_release/projectGenerator$ ./projectGenerator   
OpenGL Warning: glFlushVertexArrayRangeNV not found in mesa table  
OpenGL Warning: glVertexArrayRangeNV not found in mesa table  
OpenGL Warning: glCombinerInputNV not found in mesa table  
OpenGL Warning: glCombinerOutputNV not found in mesa table  
OpenGL Warning: glCombinerParameterfNV not found in mesa table  
OpenGL Warning: glCombinerParameterfvNV not found in mesa table  
OpenGL Warning: glCombinerParameteriNV not found in mesa table  
OpenGL Warning: glCombinerParameterivNV not found in mesa table  
OpenGL Warning: glFinalCombinerInputNV not found in mesa table  
OpenGL Warning: glGetCombinerInputParameterfvNV not found in mesa table  
OpenGL Warning: glGetCombinerInputParameterivNV not found in mesa table  
OpenGL Warning: glGetCombinerOutputParameterfvNV not found in mesa table  
OpenGL Warning: glGetCombinerOutputParameterivNV not found in mesa table  
OpenGL Warning: glGetFinalCombinerInputParameterfvNV not found in mesa table  
OpenGL Warning: glGetFinalCombinerInputParameterivNV not found in mesa table  
OpenGL Warning: glDeleteFencesNV not found in mesa table  
OpenGL Warning: glFinishFenceNV not found in mesa table  
OpenGL Warning: glGenFencesNV not found in mesa table  
OpenGL Warning: glGetFenceivNV not found in mesa table  
OpenGL Warning: glIsFenceNV not found in mesa table  
OpenGL Warning: glSetFenceNV not found in mesa table  
OpenGL Warning: glTestFenceNV not found in mesa table  
OpenGL Warning: XGetVisualInfo returned 0 visuals for 0xf9a4f0  
OpenGL Warning: Retry with 0x8002 returned 0 visuals  
Segmentation fault (core dumped)  
  

I’m not an openGL expert, but it seems to me that some vital OpenGL functions are not provided by the Virtualbox Guest Addons.
Here’s the output of the unity_support_test:

  
  
/usr/lib/nux/unity_support_test -p  
OpenGL Warning: glFlushVertexArrayRangeNV not found in mesa table  
OpenGL Warning: glVertexArrayRangeNV not found in mesa table  
OpenGL Warning: glCombinerInputNV not found in mesa table  
OpenGL Warning: glCombinerOutputNV not found in mesa table  
OpenGL Warning: glCombinerParameterfNV not found in mesa table  
OpenGL Warning: glCombinerParameterfvNV not found in mesa table  
OpenGL Warning: glCombinerParameteriNV not found in mesa table  
OpenGL Warning: glCombinerParameterivNV not found in mesa table  
OpenGL Warning: glFinalCombinerInputNV not found in mesa table  
OpenGL Warning: glGetCombinerInputParameterfvNV not found in mesa table  
OpenGL Warning: glGetCombinerInputParameterivNV not found in mesa table  
OpenGL Warning: glGetCombinerOutputParameterfvNV not found in mesa table  
OpenGL Warning: glGetCombinerOutputParameterivNV not found in mesa table  
OpenGL Warning: glGetFinalCombinerInputParameterfvNV not found in mesa table  
OpenGL Warning: glGetFinalCombinerInputParameterivNV not found in mesa table  
OpenGL Warning: glDeleteFencesNV not found in mesa table  
OpenGL Warning: glFinishFenceNV not found in mesa table  
OpenGL Warning: glGenFencesNV not found in mesa table  
OpenGL Warning: glGetFenceivNV not found in mesa table  
OpenGL Warning: glIsFenceNV not found in mesa table  
OpenGL Warning: glSetFenceNV not found in mesa table  
OpenGL Warning: glTestFenceNV not found in mesa table  
OpenGL vendor string:   Humper  
OpenGL renderer string: Chromium  
OpenGL version string:  2.1 Chromium 1.9  
  
Not software rendered:    yes  
Not blacklisted:          yes  
GLX fbconfig:             yes  
GLX texture from pixmap:  yes  
GL npot or rect textures: yes  
GL vertex program:        yes  
GL fragment program:      yes  
GL vertex buffer object:  yes  
GL framebuffer object:    yes  
GL version is 1.4+:       yes  
  
Unity 3D supported:       yes  
  

Is it possible to compile a binary with enforced software openGL rendering? That might help.
Any other suggestion?

It’s possible to work with openFrameworks in a Virtualbox by using openGL software rendering.

Surprisingly easy to achieve this:

  • Shut down the VM running Ubuntu

  • Disable the 3D acceleration in the video settings of your VM in the Virtualbox.

  • Reboot the VM again.

It is slower than hardware accelerated openGL and of course not the preferred solution. But at least it enables you to start playing around with OF.

Maybe useful for enabling hardware accelerated openGL (not tested yet):
https://forums.virtualbox.org/viewtopic.php?f=3&t=51727#p238979

I’d really appreciate a reply… anyone? … please
I’m new to OF and any kind of help is very appreciated.

In the meantime I also tried Fedora 18 as guest. Same problem.
I even modified glutInitDisplayMode in ofAppGlutWindow::setupOpenGL according to http://forum.openframeworks.cc/t/~of0.04-help-me-out-with-this-error/312/0 (of course with a rebuild) but without success.

Hi,

I re-tried recently and this time it was working.
I was using Windows 7 guest on Mac 10.7 host.

Settings I put for its display are:

  • Video memory: 128 Mb,
  • Acceleration: 3D.

I successfully ran OF from code::blocks or Visual Studio. It gives me lots or errors or warning when launching the app but it displays it correctly at the end.