Tue 16 Feb 2016 04:15:41 PM UTC, comment #1:
Known issue, fixed in trunk (see revision 1940). For some obscure reason, the patch was not applied to stable. Will be in next release (as soon as possible).
The issue is that the documentation says that direct rendering to in memory buffers is not possible, but it seems that with recent libraries, it does work while indirect does not work anymore. I added a gconf entry so that the property can be tweaked when needed.
|
Tue 16 Feb 2016 01:27:38 PM UTC, original submission:
The latest RPM version of gchem3d on Fedora 23 (gchem3d-0.14.10-11) fails on "Print Preview" and "Save As Image".
How to reproduce: start gchem3d, Tools → Import molecule → C=CCS(=O)SCC=C (the molecule appears); File → Print Preview (the error appears):
(gchem3d-0.14:2974): Gdk-ERROR **: The program 'gchem3d-0.14' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
(Details: serial 9346 error_code 2 request_code 153 (GLX) minor_code 3)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
You may skip importing a molecule (just print preview the empty GL window).
I don't know if the problem is with gchem3d or mesa (intel i915 graphics driver), but the wrong GL visual gets chosen, resulting in a BadValue error in glXCreateContext(). The following patch seems to fix it:
--- libs/gcugtk/glview.cc.bak 2016-02-14 15:11:30.367131600 +0100
+++ libs/gcugtk/glview.cc 2016-02-14 15:11:36.749116017 +0100
@@ -317,7 +317,7 @@
GdkWindow *window = (m_Window)? m_Window: gdk_get_default_root_window ();
XVisualInfo xvi = glXChooseVisual (GDK_WINDOW_XDISPLAY (window), gdk_screen_get_number (gdk_window_get_screen (window)), const_cast < int > (attr_list));
Pixmap pixmap = XCreatePixmap (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window), width, height, xvi->depth);
- GLXContext ctxt = glXCreateContext (GDK_WINDOW_XDISPLAY (window), xvi, NULL, false);
+ GLXContext ctxt = glXCreateContext (GDK_WINDOW_XDISPLAY (window), xvi, NULL, true);
GLXPixmap glxp = glXCreateGLXPixmap (GDK_WINDOW_XDISPLAY (window), xvi, pixmap);
// draw
if (glXMakeCurrent (GDK_WINDOW_XDISPLAY (window), glxp, ctxt)) {
|