C++ – OpenGL problems in virtual machine

copenglvirtual machinevirtualboxvmware

Virtualbox and VMware are giving me difficulties in trying to learn OpenGL. I have a Linux virtual machine (Lubuntu 12.10) and this is what I get as errors when I run my program:

VMware:

Unable to create OpenGL context

VirtualBox:

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

Both VMs have their appropriate guest additions installed, and 3D acceleration enabled.
glxgears works in both machines :/

My code is identical as is here: http://open.gl/context

I guess the problem might be that the OpenGL version in the given example is 3.2 so I tried changing it to 2.1 at which point VMware does not give any errors anymore but the window still doesn't show.

Thanks!

Best Answer

If you are a noob then I don't think that starting with MESA running on any kind of VM is a good idea.MESA setup is pretty complex in general.Also MESA OpenGL is outdated.It supports up to 3.2 version atm.If you want to get started with OpenGL the right and clean way you should better setup context with libs like GLUT or GLFW and load GL extension with GLEW(there are more).

Also, there are many tutorials on the net on how to get started with OpenGL.One of the best is probably this.

And don't use VM,it slows down performance considerably.

UPDATE:

As it was correctly pointed out here by Datenwolf, MESA implementation is not "outdated" but rather lags after the latest OpenGL specification which is currently 4.4

Related Topic