when I run glxinfo I get:
...
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
...
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
...
GLX version: 1.4
...
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 9500M GS/PCI/SSE2
OpenGL version string: 3.2.0 NVIDIA 195.36.24
OpenGL shading language version string: 1.50 NVIDIA via Cg compiler
...
Without polling extension functionality, from what version's functions may I assume supported? Minimum of 1.4 and 3.2 seems incredibly historic, so I assume glx version is not numbered in parallel with OpenGL version...
What GLSL version may I assume? It displays the Cg compiler version, but what's my GLSL version?
GLX is the protocol that transports OpenGL commands in a X11 command stream. The most recent version of GLX is 1.4.
The OpenGL version is told in the "OpenGL version string". And you got 3.2
so I assume glx version is not numbered in parallel with OpenGL version...
No it's not, because they're two different things. GLX transports OpenGL, it doesn't implement it.
OK, basically it turns out that it is just what it says:
GLX version 1.4
OpenGL version 3.2
GLSL version 1.50 via NVIDIA Cg Compiler
Related
I have installed the newest version of MESA (17.0.3), which should allow me to use OpenGL higher than 3.0 (right?)
The problem: I am stuck at version 3.0. (and by that I mean I don't know how to make MESA use a higher version, or even if I can) I know my computer (Chromebook running crouton for linux) has OpenGL 4.5 capability... But I also know nothing about MESA :\.
I do know that you can get info about OpenGL and such using glxinfo, so here's my best info I can give at the moment.
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 400 (Braswell)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.3
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.0.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
Thanks in advance and any help is appreciated :)
Also, for bonus marks, if anybody knows what a 'Core Profile Version' is, I would love to know :)
Note that the version string appears three times (we ignore the shading language version string):
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.3
...
OpenGL version string: 3.0 Mesa 17.0.3
...
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.0.3
So if you create a core context, you get 4.5. If you create a non-core (compatibility) context, you get 3.0. If you create an ES context, you get 3.1.
So if you want to use OpenGL 4.5 you have to request a core context. The compatibility context is the default. Information on how to create a core context will be in the documentation for whatever API you use to create an OpenGL context (GLFW, SDL, or whatever).
The (non-Mesa) vendor drivers do not behave the same way, they make the latest version available even if you select a compatibility context. However, Mesa and macOS drivers will only give you newer versions for core contexts.
I have this laptop:
http://shop.lenovo.com/us/en/laptops/thinkpad/11e-series/11e-3rd-gen-intel/?menu-id=thinkpad_11e_3rd_gen_windows
where I have installed Ubuntu. I am trying to determine what version of opengl is supported on the laptop so I run:
glxinfo|more
which gives:
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel Open Source Technology Center (0x8086)
Device: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) (0x1916)
Version: 12.0.3
Accelerated: yes
Video memory: 3072MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.3
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.3
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
GL_3DFX_texture_compression_FXT1, GL_AMD_conservative_depth,
GL_AMD_draw_buffers_blend, GL_AMD_seamless_cubemap_per_texture,
GL_AMD_shader_stencil_export, GL_AMD_shader_trinary_minmax,
From that it looks like the graphics card in the laptop supports opengl version:
Max core profile version: 4.3
But when I run:
glxinfo | grep "OpenGL version"
OpenGL version string: 3.0 Mesa 12.0.3
so maybe only version 3.0?
From this website:
https://learnopengl.com/#!Getting-started/OpenGL
seems some pretty significant architectural changes were introduced in version 3.3 so could be great if I can use that.
What of the above output tells me the correct version and can I use opengl 3.3 on this machine?
Seems I have 4.4:
Don't filter the output via grep, but read it all.
glxinfo reports separately:
the highest OpenGL Core Profile version available (in your case: 4.3)
the highest non-Core / Compatibility / < 3.2 OpenGL version available (in your case: 3.0)
the highest OpenGL ES 1 version available (1.1)
the highest OpenGL ES 2/3 version available (3.1)
The reason why Core and non-Core are reported separately is because drivers are allowed to not implement the Compatibility profile for OpenGL >= 3.2. That's precisely your case: Core gives you 4.3, non-Core only 3.0.
(Basically, OpenGL made a colossal and gigantic mess around the 3.0 and 3.1 versions. Nobody really talks about them. For mental simplicity, you can split the versioning between 3.2+ Core and pre-3.0. See also here).
Similarly, OpenGL ES 1 and 2/3 are not compatible between each other, so you need to query both to figure out what are the respective supported versions. (ES 2 and 3 are compatible between them, so they're in just one line).
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.
My problem is updating Core and GLSL version of OpenGL. I installed newest Intel drivers for my HD 4400 and still got GLSL 1.30. Thing is, this GPU should support OpenGL/GLSL 4.0. No matter what I do, it seems it can't be upgraded and glxinfo still displays 1.30 GLSL. Any help with this from anyone who had similar problem?
glxinfo reporting GL 3.0/GLSL1.30 is fine for this GPU. You are using the Mesa3D open source OpenGL implementation. This does currently support OpenGL up to version 3.3. However, it only does support modern GL for core profiles only (and which is the only profile they are required to proovide, as by the spec). In compatibiliy mode, it is limited to GL 3.0 / GLSL 1.30 - and that is what you see here.
Old versions of glxinfo do not know about core profiles at all, and are limited to compatibility/legacy contexts. More recent versions of glxinfo will report both. So for an Intel HDxxxx GPU on Linux, you will get an output similiar to
$ glxinfo | grep -i opengl
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.0.1
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:
OpenGL version string: 3.0 Mesa 10.0.1
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
I'm having trouble running an opengl(3.3) program through ssh.
When I run:
glxinfo | grep -i opengl
on my own computer (ubuntu 12.04) I get:
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro FX 580/PCIe/SSE2
OpenGL version string: 3.3.0 NVIDIA 304.116
OpenGL shading language version string: 3.30 NVIDIA via Cg compiler
OpenGL extensions:
when I ssh to the remote computer(ubuntu 10.04) and run the same command, I get:
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Quadro FX 580/PCIe/SSE2
OpenGL version string: 2.1.2 NVIDIA 304.116
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
OpenGL extensions:
For some reason I'm not getting the more up to date version of opengl(3.3) when sshing to the remote computer. Is there a workout to this problem that doesn't require admin privileges on the remote computer?
OpenGL over SSH means using an indirect rendering context which uses the GLX protocol to send OpenGL commands to the X server. The GLX protocol goes only up to OpenGL-2.1. There's no support for OpenGL-3 or later in GLX so far. Essentially you're SOL until someone finally gets around to specify/implement GLX3.