VMware Communities
zzzhhh
Contributor
Contributor
Jump to solution

The MESA's OpenGL version of the guest ubuntu 16.04 is too low.

I installed a ubuntu 16.04 in VMware workstation 11 (my CPU doesn't support newest 14 pro) and then installed mesa 17.2.4 which claims to support OpenGL 4.5. But what I got is only OpenGL 2.1, according to the output of command "glxinfo|grep OpenGL":

Untitled.png

So, how can I get OpenGL 4.5 in the guest OS? The host is using Intel integrated graphics which supports only OpenGL 1.1. I'm not sure if it is a culprit. Thank you for your help.

Tags (3)
Reply
0 Kudos
1 Solution

Accepted Solutions
bluefirestorm
Champion
Champion
Jump to solution

The best that you can have in a Workstation VM guest at the moment is support for OpenGL 3.3 core profile.

For that you need Workstation 12.x/14.x, VM virtual hardware compatibility set to version 12, 3D acceleration enabled.

For Windows hosts, you need a DX11 capable graphics card. OpenGL 4.x also works for Windows hosts but that is not the out-of-the-box settings.

For Linux hosts, I don't have any direct experience with having OpenGL 3.3 capable VMs as the Linux host that I have aren't even capable of OpenGL 3.3. And I can't find any specific OpenGL version requirement stated in the documentation. You might be able to get by with an OpenGL 3.3 capable Linux host but to be on the safe side, maybe OpenGL 4.x would be preferred.

View solution in original post

Reply
0 Kudos
6 Replies
bluefirestorm
Champion
Champion
Jump to solution

The best that you can have in a Workstation VM guest at the moment is support for OpenGL 3.3 core profile.

For that you need Workstation 12.x/14.x, VM virtual hardware compatibility set to version 12, 3D acceleration enabled.

For Windows hosts, you need a DX11 capable graphics card. OpenGL 4.x also works for Windows hosts but that is not the out-of-the-box settings.

For Linux hosts, I don't have any direct experience with having OpenGL 3.3 capable VMs as the Linux host that I have aren't even capable of OpenGL 3.3. And I can't find any specific OpenGL version requirement stated in the documentation. You might be able to get by with an OpenGL 3.3 capable Linux host but to be on the safe side, maybe OpenGL 4.x would be preferred.

Reply
0 Kudos
zzzhhh
Contributor
Contributor
Jump to solution

Thank you. I installed VMware workstation 12.5.7 as per your instructions and then the OpenGL version brought about by Mesa 17.2.4 in the guest is now 3.0:

Untitled.png

But I still cannot use OpenGL 3.3, so GLFW fails to create a window that uses core profile. However, the information in the screenshot above seems to suggest the availability of OpenGL 3.3 (and GLSL 3.30). Do you know how can I make use of it? Thanks a lot!

PS: the GLFW code that tries to use core profile of OpenGL is:

glfwInit()

glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

GLFWwindow* window = glfwCreateWindow(800, 600, "Hello World!", NULL, NULL);  //this line will complain: "Error: Context profiles are only defined for OpenGL version 3.2 and above"

PS2: The integrated intel graphics chip (Intel G41 Eaglelake-G) supports only DirectX v10. I'm not sure if it is the reason why I cannot use OpenGL 3.3. I am using windows 7 as the host.

Reply
0 Kudos
bluefirestorm
Champion
Champion
Jump to solution

I don't know what happens if the host OS is capable of DX11 (in this case Windows 7) and the graphic card isn't. I don't know what VMware will do or does it just have certain capabilities that are absent. But from the looks of the glxinfo it appears the VM does have OpenGL 3.3 core profile; whether or not once OpenGL calls are made, and the capability is not there, the OpenGL might just fail, possibly not so gracefully.

I am not familiar with GLFW SDK API. But it looks like it is some sort wrapper library.

Since it is complaining about OpenGL version; have you tried putting

glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);

glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);

before the glfwCreateWindow call.

Other than that, I am afraid it is more of a question of GLFW SDK programming and what it capabilities it sees in the OpenGL in the VM.

Reply
0 Kudos
zzzhhh
Contributor
Contributor
Jump to solution

You are really a genius! After forcibly specifying the OpenGL version to 3.3 using the statements you gave, everything works fine as if I have an nVidia GeForce GTX 1080 Ti installed. Following is what I got; I share it with you. What beautiful triangles! Note that the code is for OpenGL 4.5. It is the first example of the OpenGL red book for 4.5; everyone will know what I mean if s/he happens to read this book. Thank you again for your help!

Untitled.png

Reply
0 Kudos
famadorian
Contributor
Contributor
Jump to solution

Not sure I understand. You say: "VM virtual hardware compatibility set to version 12"

Where can I set this "VM virtual hardware compatibility"?

I found this:

VMware - Update the compatibility version of a VM (Virtual hardware) -

, but this is not something I have. I have VMWare Player. Is this something that only exists in VMWare Workstation?

I'm on Ubuntu GNU/Linux 18.04 and I have trouble getting OpenGL 3.3 in a Windows 10 guest.

Reply
0 Kudos
bluefirestorm
Champion
Champion
Jump to solution

@famadorian,

The change hardware compatibility is available in Workstation Pro and not available in the non-commercial use free licence VMware Player.

You don't say what version of VMware Player you currently have.

If the VM was created with an earlier version of VMware Player (such as 11 or earlier), the virtual hardware version will not be 12 or 14.

You can try either of the following, shut down the VM (not suspend) and then back up your VM first.

(1) edit vmx configuration file and manually edit the

virtualHW.version = "12"

or

virtualHW.version = "14"

(2) create a new VM under VMware Player (presumably you have either version 12 or version 14) but use the existing VM disk

If you still have OpenGL 3.3 issues inside the VM despite having virtual hardware version set to 12 or 14, It is best you create a separate thread/post instead of reviving an old thread that has been deemed closed by the thread starter.

Reply
0 Kudos