Re: [GtkGLExt] pixmap.c example crashes under fedora 8



Hi,

I have the same issue in gchemutils (http://gchemutils.nongnu.org). Many
drivers seem to not accept to render GL scenes off-screen, especially
those supporting direct rendering. At the moment, I have not a full
solution, but here are some things that can be done:

	gdk_error_trap_push ();
	gboolean result = gdk_gl_drawable_gl_begin (drawable, context);
	gdk_flush ();
	if (gdk_error_trap_pop ())
		result = FALSE;

This avoids the crash at least, but of course, you can't draw to the
pixmap. In that case, I use the back buffer of a GL enabled widget to
render the scene, dividing it if necessary (when the pixmap is larger
than the widget), you'll find the code at
http://cvs.savannah.nongnu.org/viewvc/gchemutils/gcu/glview.cc?revision=1.6.2.2&root=gchemutils&view=markup&pathrev=gchemutils-0-8

It does not always work (the cygwin build does not draw anything, and we
could not find why yet).

One other solution I have not implemented yet is to do the job using
osmesa in an external non-X program.

If somebody knows of a better solution...

Regards,
Jean

Le dimanche 20 janvier 2008 à 00:35 +0100, Christian Anthon a écrit :
> Hi all,
> 
> I have an application with a problem using a gdk drawable pixmap. I
> therefore tried compiling the pixmap.c example and it does the same
> thing.
> 
> The X error suggests running with --sync and breaking on gdk_x_error
> to get a backtrace. The relevant part of the backtrace is 
> 
> #0  gdk_x_error (display=0x9fdb020, error=0xbfb9a398) at
> gdkmain-x11.c:614
> #1  0x003b871e in _XError (dpy=0x9fdb020, rep=0xa3295d8) at
> XlibInt.c:2905
> #2  0x003c0263 in _XReply (dpy=0x9fdb020, rep=0xbfb9a4cc, extra=0,
> discard=0) at xcb_io.c:417 
> #3  0x06f2301d in ?? () from /usr/lib/libGL.so.1
> #4  0x06f23415 in glXMakeCurrentReadSGI () from /usr/lib/libGL.so.1
> #5  0x06f236a3 in glXMakeCurrent () from /usr/lib/libGL.so.1
> #6  0x007603fe in gdk_gl_pixmap_impl_x11_make_context_current
> (draw=0xa2266e0, read=0xa2266e0, glcontext=0xa219a90) at
> gdkglpixmap-x11.c:294
> #7  0x0073ea8d in gdk_gl_drawable_gl_begin (gldrawable=0xa2266e0,
> glcontext=0xa219a90) at gdkgldrawable.c:143
> #8  0x08049753 in configure_event (widget=0x9fe84a0, event=0x9fea790,
> data=0x0) at pixmap.c:118
> 
> Is this a known issue, and is there a fix or work around.
> 
> Christian.
> _______________________________________________
> gtkglext-list mailing list
> gtkglext-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkglext-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]