I am trying to support “off screen rendering” for most graphics cards.
OpenGL 2.x FrameBuffer object works.
OpenGL 1.x with GLX 1.3 PBuffer’s work
OpenGL 1.x with GLX 1.2 PBuffer’s do not work
Since glXCreatePbuffer only works on GLX 1.3, I have to use glXCreatePbufferSGIX as a fallback.
It should have been a simple task. But it fails when calling “glXMakeCurrent” with the following error:
mark@mark-desktop:~/tmp$ g++ -lX11 -lGL pbuffer.c
mark@mark-desktop:~/tmp$ ./a.out
** WHY DOES THIS LINE REPORT AN X ERROR? **
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 136 (DRI2)
Minor opcode of failed request: 3 (DRI2CreateDrawable)
Resource id in failed request: 0x4200001
Serial number of failed request: 23
Current serial number in output stream: 24
The example program can be found at: http://esoteric.clanlib.org/~rombust/pbuffer.c
(For reference, I am trying to get ClanLib to work with more “free” drivers.)
(I am using the default ATI driver on ubuntu)