Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1460 closed defect (fixed)

linux swap interval code breaks offscreen rendering

Reported by: Greg Couch Owned by: Tom Goddard
Priority: blocker Milestone:
Component: Graphics Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

src/core/graphics/_graphics/linux_swap_interval.cpp links against glXGetProcAddress. When OSMesa is used that generates:

ImportError: /home/gregc/src/chimerax/ChimeraX.app/lib/python3.6/site-packages/chimerax/core/graphics/_graphics.so: undefined symbol: glXGetProcAddress

A workaround would be to use dlsym instead of glXGetProcAddress. Or maybe there is a trick using a weak symbol version of glXGetProcAddress that would work.

Change History (5)

comment:1 by Greg Couch, 7 years ago

Went ahead and made the change to use dlsym. It compiles and doesn't break offscreen rendering, but needs to be tested in GUI mode.

comment:2 by Eric Pettersen, 7 years ago

Component: UnassignedGraphics

comment:3 by Tom Goddard, 7 years ago

I took out the dlsym code. Please don't make untested changes that will break VR on linux.

It seems that the problem is glXGetProcAddress is not found because _graphics.so isn't compiled correctly -- it needs to link against the library that contains this symbol. I guess the reason we weren't burned by this compiling mistake in gui mode is because importing PyOpenGL brings in the needed library and is done before importing _graphics.so (except when offscreen is used).

I don't have a linux development system to fix the linking problem, but will fix it when I get time on such a system.

comment:4 by Tom Goddard, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

Linked _graphics.so against libGLX.so on Linux. The vsync control will not be used during offscreen rendering.

comment:5 by Tom Goddard, 7 years ago

Fixed again.

glXSwapInterval*() is in libGL.so not libGLX.so on Linux.

Note: See TracTickets for help on using tickets.