anholt / libepoxy

Epoxy is a library for handling OpenGL function pointer management for you

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

glGetString displays (null) for nvidia-340xx

wojnilowicz opened this issue · comments

Steps to reproduce:

  1. unpack gl3.zip
  2. compile gl3.cxx with "cc -o gl3 gl3.cxx -Dwith_epoxy=1 -lGL -lX11 -lepoxy"
  3. run "./gl3"

Result:
OpenGL vendor string: (null)

Expected result:
OpenGL vendor string: NVIDIA Corporation

Additional info:

  1. compiling gl3.cxx with "cc -o gl3 gl3.cxx -Dwith_epoxy=0 -lGL -lX11 -lepoxy" gives
    OpenGL vendor string: NVIDIA Corporation

  2. compiling gl3.cxx with "cc -o gl3 gl3.cxx -Dwith_epoxy=1 /usr/lib64/libOpenGL.so /usr/lib64/libGLX.so -lX11 -lepoxy" gives
    OpenGL vendor string: (null)

  3. compiling gl3.cxx with "cc -o gl3 gl3.cxx -Dwith_epoxy=0 /usr/lib64/libOpenGL.so /usr/lib64/libGLX.so -lX11 -lepoxy" gives
    libGL error: No matching fbConfigs or visuals found
    libGL error: failed to load driver: swrast
    X Error of failed request: GLXBadFBConfig
    Major opcode of failed request: 154 (GLX)
    Minor opcode of failed request: 0 ()
    Serial number of failed request: 37
    Current serial number in output stream: 37

  4. reverting dbfa4b2 helps

  5. KDE relies on info returned from glGetString to enable compositing, and after getting (null) for every query, the compositor remains disabled.

  6. Fedora 34 X86_64, libepoxy 1.5.7, nvidia 340.108

Please fix this.

This is a duplicate of #252.

commented

@wojnilowicz is it the same with cc -o gl3 gl3.cxx -Dwith_epoxy=1 -lX11 -lepoxy (just dropped linking with libOpenGL.so and libGLX.so, libepoxy should load them dynamically)

commented

@wojnilowicz also, could you, please, check if libGLX.so is provided by libglvnd?

@wojnilowicz is it the same with cc -o gl3 gl3.cxx -Dwith_epoxy=1 -lX11 -lepoxy (just dropped linking with libOpenGL.so and libGLX.so, libepoxy should load them dynamically)

Yes.

@wojnilowicz also, could you, please, check if libGLX.so is provided by libglvnd?

Yes.