alecjacobson / computer-graphics-shader-pipeline

Computer Graphics Assignment about the Shader Pipeline
14 stars 24 forks source link

OpenGL version incorrect on my personal desktop #53

Open aiwen324 opened 5 years ago

aiwen324 commented 5 years ago

Hi, I just noticed the program is not using the correct opengl version when I try to run the program. It causes problem since I find the result doesn't behave correctly on my personal computer.

Here is the output from the program:
[aiyifei@archlinux build-release]$ ./shaderpipeline ../data/test-08.json 

Usage:
  [Click and drag]  to orbit view
  [Scroll]  to translate view in and out
  A,a  toggle animation
  L,l  toggle wireframe rending
  Z,z  reset view to look along z-axis
OpenGL version recieved: 3.2.0
Supported OpenGL is 3.2.0 NVIDIA 435.21
Supported GLSL is 1.50 NVIDIA via Cg compiler
../data/test-08.json has changed since last compilation attempt.
-----------------------------------------------
../src/version410.glsl has changed since last compilation attempt.
-----------------------------------------------
shader compilation successful.

Here is the output from glxinfo:

[aiyifei@archlinux build-release]$ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce RTX 2080/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 435.21
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 435.21
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 435.21
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
abhimadan commented 5 years ago

We were setting the minimum version to 3.2, which some OSes interpret as "use at least 3.2" and others interpret as "use exactly 3.2". This has been fixed in the repo, so pull to get the changes.

aiwen324 commented 5 years ago

Thanks, it does change the version, but still something is wrong with the opengl provided by Nvidia driver or the hardware I cannot tell. If I use opengl provided by Mesa and integrated intel gpu(the one on my laptop), it works as expected, but with Nvidia OpenGL 4.0 or 4.6(I tried this as well) on my desktop, The output is still incorrect. Anyway, I'll just use my laptop then.

Here is an example of the incorrect behavior. Notice those black area which should be yellow or green. image