Sang Ahn
There isn't currently a way to bind a GLX pbuffer (like
WGL_ARB_render_texture) so you'll have to stick with good old
glCopyTexImage2D and glCopyTexSubImage2d.
Jason A.
"Sang Ahn" <san...@surgicalinsights.com> wrote in message
news:bc6dc74a.02091...@posting.google.com...
greetz
--
Max Celedon Collins
http://ugs3d.sourceforge.net
http://www.xinitry.cl
On 19 Sep 2002 14:16:06 -0700
// Frame buffer attribute list
int nFBAttrib[] = {GLX_DOUBLEBUFFER, 1,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DEPTH_SIZE, 12,
None};
// P buffer attribute list
int nPBAttrib[] = {GLX_DOUBLEBUFFER, 0,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_ALPHA_SIZE, 1
GLX_DEPTH_SIZE, 12,
None};
Display* dpy = XOpenDisplay(NULL);
int nElements;
GLXFBConfig* fbc; // Frame buffer config
GLXFBConfig* pbc; // P buffer config
fbc = glXChooseFBConfig(dpy, DefaultScreen(dpy), nFBAttrib,
&nElements); // this line works fine
pbc = glXChooseFBConfig(gpy, DefaultScreen(dpy), nPBAttrib,
&nElements); // this line returns nElements = 0
As you can see the last line doesn't allow me to create an
alpha-channel for the pbuffer. Any help is greatly appreciated
"Jason Allen" <jra...@yahoo.com> wrote in message news:<9vri9.490194$q53.16...@twister.austin.rr.com>...
You didn't tell us about your hardware, OS, nor GLX version. You're
calling GLX 1.3 functions in that code. Does your system support GLX 1.3
? If affirmative, does your hardware support destination alpha?
César
cesar...@ono.com
>That's the problem, I can't seem to create 32-bit pixel width for the
>pbuffer. This is some sample of the code I'm using
>
>// P buffer attribute list
>int nPBAttrib[] = {GLX_DOUBLEBUFFER, 0,
> GLX_RED_SIZE, 1,
> GLX_GREEN_SIZE, 1,
> GLX_BLUE_SIZE, 1,
> GLX_ALPHA_SIZE, 1
> GLX_DEPTH_SIZE, 12,
> None};
>As you can see the last line doesn't allow me to create an
>alpha-channel for the pbuffer. Any help is greatly appreciated
I think the framebuffer must support the config though; so on some
cards you might find that you cannot request alpha buffers.
Try 'glxinfo' to see if there's a visual ID that suits your specs (and
modify your specs accordingly).
Also, try a GLX_DEPTH_SIZE of 16, 24 or 32. 12 is odd; your GLX
implementation might be braindead and refuse the config based on that.
Ruud van Gaal
Free car sim: http://www.racer.nl/
Pencil art : http://www.marketgraph.nl/gallery/
César Blecua Udías <cesar...@ono.com> wrote in message news:<3D8B3346...@ono.com>...
>That's the problem, I can't seem to create 32-bit pixel width for the
>pbuffer. This is some sample of the code I'm using
This is 100% device dependent. It seems that your device doesn't support
this. There is nothing in the pbuffer specification that requires a device
driver to behave either way. Apparently, the driver for you device behaves
in a way that's inconvenient, but not illegal.
--
"...the VCR is to the American film producer and the American public as the
Boston strangler is to the woman home alone." -- Jack Valenti 1982
Thanks Jack, but you don't know jack!
Does your machine have a FBConfig-capable 'glxinfo' tool? The 'glxinfo'
tool shows the list of GLX visuals for your framebuffer configuration.
If your 'glxinfo' version supports FBConfigs (like the SGI version), it
will tell whether each visual can be used for windows, pixmaps and
pbuffers.
Btw, when you say "24-bit wide frame buffer", do you mean that you can
configure your hardware to have a 24bit or 32bit framebuffer? In such
case, the number and type of supported visuals is likely to change (even
for pbuffers). This is typical on SGIs. The 'xsetmon' SGI tool settings
can change the list of visuals returned by 'glxinfo' on many SGI
workstations.
César
cesar...@ono.com