Off screen rendering with GLX pixmaps

Guillaume Duhamel guillaume.duhamel at gmail.com
Sat Jan 5 07:25:57 PST 2008


> First of all why do you want to use GLXPixmaps for off screen rendering? Most drivers don't accelerate it all. At least modern Nvidia drivers accelerate it and I think AIGLX capable drivers (I have no experience with AIGLX).

Ok, let me give a bit of background...
Everything started with DeSmuME (http://desmume.org), an emulator I'm
maintaining. Someone (not me) added 3D support some time ago and since
that time users have been reporting about the GLXBadContext bug. I
wasn't able to reproduce it until I got a new laptop with an intel
card.

Then I started searching for the problem and quickly found that it was
related to gtkglext (btw, it seems other users reported the same
problem: http://mail.gnome.org/archives/gtkglext-list/2007-November/msg00003.html).
Next I searched through the gtkglext code and found that it was
related to GLX pixmaps.

I thought that I may fix the problem and send a patch to gtkglext team
(I mean, if it's a hardware specific issue, they may not be able to
fix it) but it seems I can't get it to work.

> Most other drivers (which use DRI) fall back to indirect rendering most of the time the drivers turn into plain Mesa. It might not support the XVisual you are presenting it, plain Mesa can have strange issues. For instance if I remember correctly it doesn't support single buffered visuals (at least those don't show up in glxinfo if you use plain Mesa) and that could be your problem. Try asking for a double buffered visual.

I tried it and got the same result. The only other clue I found is on
glxchoosevisual manpage
(http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/glx/xchoosevisual.html)
where is state that "GLXPixmaps are supported for visuals whose
GLX_BUFFER_SIZE is one of the pixmap depths supported by the X
server." but I'm not even sure to understand what it means.

> Really if you want to use off screen rendering also consider the use of pbuffers (though not all drivers support them) and even better on more modern drivers FBOs.

In fact, I don't mind much about using another way to implement off
screen rendering... I just need it to be portable and to include well
in DeSmuME code.

Guillaume



More information about the xorg mailing list