[chimerax-users] Stereo mode error

Tom Goddard goddard at sonic.net
Tue Jan 5 10:31:12 PST 2021


Hi Jean-Christophe,

  The ChimeraX error using stereo means that the OpenGL graphics call ChimeraX made

	glDrawBuffer(GL_BACK_RIGHT)

gave and "Invalid operation" error.  When rendering in stereo there is a left eye buffer and right eye buffer.  First ChimeraX draws the left eye image, then it tried to start drawing the right eye image but could not switch OpenGL to use the right eye buffer.  That is almost surely because the OpenGL context ChimeraX got was not a stereo context, so it had no right eye buffer.  Since you started stereo in ChimeraX it asked for a stereo context, and when it got the context ChimeraX asked to make sure it really was a stereo context because if it is not possible to get the requested stereo context then it simply returns a mono (single eye) context.  ChimeraX would have given an error if this check failed, so it was told it was given a stereo context.  But it very likely that was just a bug in either the Qt window toolkit or the graphics driver that it failed to say "this is not a stereo context".  So only when ChimeraX tried to use it for the right eye did it give an error.

  Since you got other stereo programs to work we know your system is capable of stereo.  But glxgears and Coot are rather ancient and it is very likely they are using legacy OpenGL contexts.  ChimeraX requests a "core" OpenGL context which is the standard modern OpenGL (for at least 5 years now).  So it may be that the Nvidia driver cannot provide a stereo core context, while it can provide a legacy context.  If this is the situation you could user our older program Chimera which also uses a legacy OpenGL context.  I suggest you try Chimera 1.15 (latest) and see if it works in stereo.  Use the Chimera command "stereo sequential" to enable it.

  I have used ChimeraX stereo with both Nvidia 3D Vision and also a StereoEyes 3D glasses projector system on Windows 10 about a year ago (before covid restrictions, now I work from home and those computers are at UCSF).  I have not tested it on Linux.  The limitation you are encountering is very likely the graphics driver and a suitable Windows driver may work while the Linux driver does not.  Nvidia dropped support for 3D Vision in drivers about a year and a half ago.  I have only tested Windows stereo with 3D Vision with an older Windows driver before it was dropped.  I know Nvidia said they would provide a separate driver for 3D Vision (for the USB stereo emitter) but I have never tried that.  At any rate, I do not know how you get a current Nvidia driver to work with 3D Vision, although apparently you do since glxgears and Coot are working.  ChimeraX is only using the standard OpenGL API and the Qt window toolkit to get the OpenGL context, nothing specific to Linux or Windows or the kind of stereo hardware you are using.  So if it doesn't work it is because the standard OpenGL core profile is not working, almost surely due to lack of driver support.

	Tom


> On Jan 5, 2021, at 4:44 AM, Jean-Christophe HAESSIG <haessigj at igbmc.fr> wrote:
> 
> Hi,
> 
> I'm in charge of software packaging for our users at IGBMC. I'm trying
> to make stereo mode work since we still have several 3D vision sets.
> Even if that hardware has been retired, it seems that there isn't a
> more practical solution to 3D visualization ATM. We are going to test
> how it goes with a VR headset, but it already seems that not being able
> to look at anything else while using it will be a hindrance.
> 
> I found a message on that subject dating back to June 2017, but I get
> the same errors even with the 0.1alpha2 version which seems to match
> what would have been current at that time :
> 
> An error occurred in drawing the scene. Redrawing graphics is now
> stopped to avoid a continuous stream of error messages. To restart
> graphics use the command "graphics restart" after changing the settings
> that caused the error.
> 
> Traceback (most recent call last):
> File "/usr/lib/ucsf-chimerax/lib/python3.7/site-
> packages/chimerax/core/updateloop.py", line 73, in draw_new_frame
> view.draw(check_for_changes = False)
> File "/usr/lib/ucsf-chimerax/lib/python3.7/site-
> packages/chimerax/graphics/view.py", line 165, in draw
> self._draw_scene(camera, drawings)
> File "/usr/lib/ucsf-chimerax/lib/python3.7/site-
> packages/chimerax/graphics/view.py", line 205, in _draw_scene
> camera.set_render_target(vnum, r)
> File "/usr/lib/ucsf-chimerax/lib/python3.7/site-
> packages/chimerax/graphics/camera.py", line 442, in set_render_target
> render.set_stereo_buffer(view_num)
> File "/usr/lib/ucsf-chimerax/lib/python3.7/site-
> packages/chimerax/graphics/opengl.py", line 1206, in set_stereo_buffer
> GL.glDrawBuffer(b)
> File "src/errorchecker.pyx", line 58, in
> OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError
> OpenGL.error.GLError: GLError(
> err = 1282,
> description = b'invalid operation',
> baseOperation = glDrawBuffer,
> cArguments = (GL_BACK_RIGHT,)
> )
> 
> The host computer runs ubuntu 20.04 with the latest nvidia drivers
> (455). ChimeraX is deployed through a singularity container based on
> ubuntu 18.04.
> I got glxgears and coot running on the same setup (in 0.8.2 since
> latest coot also has a known bug in hardware stereo rendering as of
> now)
> 
> Can anyone make sense of the error above ? I have a programming
> background so I can have a look but I have no idea where to start.
> 
> Thanks,
> J.C. Haessig -- systems administrator, IGBMC
> 
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
> 




More information about the ChimeraX-users mailing list