I'm running that configuration :
Ubuntu 12.04
Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller
glxinfo give me that parameters:
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Desktop
OpenGL version string: 3.0 Mesa 10.1.3
OpenGL shading language version string: 1.30
OpenGL extensions:
I did
1.) Add the PPA Repository
$ sudo add-apt-repository ppa:oibaf/graphics-drivers
2.) Update sources
$ sudo apt-get update
3.) Dist-upgrade (rebuilds many packages)
$ sudo apt-get dist-upgrade
4.) Reboot!
I got mesa 10,but OpenGL is still 3.0.I found some people say Intel Graphics doesn't support OpenGL 3.3 yet. but some say in the last official release of Mesa (10.0), GL 3.3 only works on Intel hardware.
but some people work out.
Does Ubuntu 12.04 support OpenGL 3.3?
Does Intel Graphic support it?
What should I do to enable GL3.3
Related
As part of my studies, I have to be able to compile and run OpenGL 4.5-based programs, and I only have a Mac to do so. I am using Ubuntu in a VM to have a more programming-friendly environment, but my software and hardware (macOS Sierra 10.12.6, Intel HD Graphics 4000) is limited to 3.3 contexts. Here is additional info (ran from the Ubuntu VM) :
$ glxinfo | grep 'OpenGL core'
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
The assignments use GLFW. I've been trying to get it to use Mesa (which it does, with llvmpipe) with software rendering so that it is independent from the hardware capabilities (if I understand correctly), but the window creation always fails when I try to create a 4.5 context. I looked around and tried using export LIBGL_ALWAYS_SOFTWARE=1 to no avail. The build chain uses CMAKE to build both the assignments and the actual GLFW lib, for what it's worth (I noticed that it uses X11 with the xorg-dev packages).
Does Mesa implement any version of OpenGL 4 ? If it does, can I force software rendering on GLFW's part so that I can create an OpenGL 4.x context ?
Does Mesa implement any version of OpenGL 4 ?
Their Intel & Radeon hardware drivers do.
... can I force software rendering on GLFW's part so that I can create an OpenGL 4.x context ?
Nope, all of Mesa's software renderers (softpipe, llvmpipe, & swr) top out at OpenGL 3.3.
As of Mesa 20.2 llvmpipe supports OpenGL 4.5.
I'm currently running Ubuntu 16.04.2, fairly new install with just enough to start programming. I do have a r9 390 AMD card which has been having lots of issues with the AMD drivers, but I don't think that is an issue.
I created a dockerfile with the following snippet:
FROM ubuntu:16.04
.....
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
WORKDIR /buildls
CMD ["bash"]
RUN apt-get install -y x11-apps
RUN apt-get install -y libcanberra-gtk*
RUN apt-get -y install libglfw3-dev
RUN apt-get -y install libglew-dev
RUN apt-get -y install mesa-utils
.......
After building it, I run it with:
docker run -it `#container process` \
-v /tmp/.X11-unix:/tmp/.X11-unix `#Allows the X11 server to be shared (GUI)` \
-v $(pwd)/volume:/app `#Shares a folder, one down in current directory (~/volume) with ROOT/app in the container` \
-e DISPLAY=$DISPLAY `#Shares the display between the 2 systems` \
opengl_why_you_no_work \
I created a simple GL loader program, with GLFW and GLEW, I made 2 versions to support OpenGL 2.1 (you'll see why later) and 3.2. Between the sample program that I wrote (with some debugging output calls) and
glxinfo|grep OpenGL
I get some interesting questions.
Using the glxinfo call on my host, I get
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD HAWAII (DRM 2.46.0 / 4.8.0-58-generic, LLVM 3.8.0)
OpenGL core profile version string: 4.1 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 4.10
OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 12.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
On the docker image:
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 12.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
hmmm, vendors? So, the program written for OpenGL 2.1, using:
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
Runs on both host and docker; simple rendering... but it works. Even though it renders on the docker image, I still get this error:
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: radeonsi
If I try to run the version made for OpenGL 3.2 on the docker image, I get no rendering, no window, the same 2 errors above, and this output:
Renderer: (null)
OpenGL version supported (null)
instead of the 2.1 version on the docker image:
Renderer: Gallium 0.4 on llvmpipe (LLVM 3.8, 256 bits)
OpenGL version supported 3.0 Mesa 12.0.6
or the result of running either version on the host:
Renderer: Gallium 0.4 on AMD HAWAII (DRM 2.46.0 / 4.8.0-58-generic, LLVM 3.8.0)
OpenGL version supported 4.1 (Core Profile) Mesa 12.0.6
So, I'm assuming it has something to do with the vendor, X.org versus VMware, Inc. Can I override, passthrough, replace, or otherwise work around this? I could probably write the code for OpenGL 3.0 (where is the fun in that?) but the libGL errors have me concerned once I get more complex in the program. Additionally, I want to try with OpenCL and I'm sure I'll have similar issues.
I found the answer, however it might be some over kill... but it works!
I added to the Dockerfile:
RUN apt-get install -y xserver-xorg-video-all
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libgl1-mesa-dri \
&& rm -rf /var/lib/apt/lists/*
....
RUN usermod -a -G video <username>
However, I think the mesa files were already there as a result of the
FROM ubuntu:16.04
line. I also added:
--device=/dev/dri:/dev/dri
to the script to run the docker image. Interesting to note, while I was troubleshooting, I upgrade MESA to the most recent version (17.1 here -> https://www.omgubuntu.co.uk/2017/05/mesa-17-1-ubuntu-ppa), now I have GL 4.5 on my host and 4.1 with MESA 12.0.6 on the image... Of course now I will have to workout how I will make it executable from a Windows/OS host.
I used the following references:
pg 303 of Robot Operating System (ROS): The Complete Reference, Volume 2
https://bbs.archlinux.org/viewtopic.php?id=175164
https://github.com/hilbert/hilbert-docker-images/issues/9
Using GPU from a docker container?
https://askubuntu.com/questions/809081/how-to-run-opencl-program-in-docker-container-with-amdgpu-pro
Running the command glxinfo | grep OpenGL shows
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;
OpenGL version string: 2.1 Mesa 10.7.0-devel
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 10.7.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
I have the Intel HD 4000 graphic card which can support OpenGL 3.3 according to the sources on internet.
Simply, what should I do so that glxinfo shows version 3.3 so that I may proceed to learn modern graphics programming?
You're running in a VM. GPUs usually are not passed through to the VM and all you get is a shim-driver supporting only a lower OpenGL version, which commands are passed through the VM to the host.
Solution: Run Linux natively on your box.
I currently am using VMWARE 11 guest Linux Mint, on a host win 8.1
So i am basically trying to update OpenGL so that i can program with higher versions of GLSL and OpenGL such as 3.3 , as it currently stands when i check with glxinfo | grep OpenGL , i get
$ glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;
OpenGL version string: 2.1 Mesa 10.1.3
OpenGL shading language version string: 1.20
OpenGL extensions:
Now i went to Mesa3d website and downloaded the 10.5.6(as you can see above the one i have installed is 10.1.3)in which the OPenGL version has been updated to version 3.3 which is what i would prefer to have over the current version which is 1.2(shading language GLSL) i downloaded the tar , extracted it , ran ./configure as instructed, and it did its thing, ran make as ./configure finished by saying run make now , and finally ran sudo install make which was the last autoconf instruction , and all completed successfully, i even ran them a second time when i found out that glxinfo | grep OpenGL was still giving me the same return as before i "installed" the mesa 3d drivers
so i am trying to find out what is missing here and why this is not installing?
is it because of the fact that i am running a guest OS linux on a host vmware?or is it something less complicated and actually fixable?
Did you uninstall the system Mesa installation? Because if not you've got two Mesa installations side-by-side and that will not end well. Also when configuring you should select the parts of Mesa you want. Which in your case would be none of the GPU drivers and just the softpipe implementation.
I've been struggling with setting up opengl in ubuntu.
My glxinfo:
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile
OpenGL version string: 2.1 Mesa 9.1.3
OpenGL shading language version string: 1.20
OpenGL extensions:
I have a nvidia GT 520m card, how can I use opengl library by nvidia? I installed nvidia-current and nvidia-current-dev, but nothing happens. I need a newer version of opengl but it seems my intel integrated card only supports opengl 2.1.
My laptop:
Acer 4743g; 2g ddr3 memory; gt 520m graphics card.
System Settings > Software & Updates > Additional Drivers tab
Select the NVIDIA one and reboot