Has anyone been able to use doublebuffered pbuffers in any application, not just a JOGL app? I really need to use a doublebuffered pbuffer by both the ati and nvidia cards I have access to don’t seem to work. I get valid pbuffer-only pixelformats that support doublebuffering, I am using windows btw, and valid pbuffer handles, but glReadPixels always returns a empty black rectangle no matter what buffer I am reading from. If anyone can show me a bit of code or has a reason why this isn’t working I would greatly appreciate it.
This sounds silly, but I had a similar problem when using PBuffers that was solved just by placing a reshape() call in my init() method. I can’t tell you why this helped, but it’s worth a try if you haven’t already…
public void init(GLDrawable drawable) {
//System.err.println("offscreen init called");
GL gl = drawable.getGL();
gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f); // white background
gl.glColor4f(0.0f, 0.0f, 0.0f, 1); // black foreground
// this call turns out to be critical, even though I'm not sure what it does
reshape( drawable, 0, 0, px, py );
...
}
Daniel
Single buffered pbuffers work just fine for me. The problem is that if I try to make a doublebuffered pbuffer it just doesn’t work. I don’t get any errors from wglGetLastError or glGetError. My pixelformats support doublebuffering, and my pbuffer handle is good. In the end I just have a black rectangle. I have searched all over the place looking for an example of db pbuffers but I can’t find any. ATI, nvidia, and the pbuufer spec all mention that you can make a doube buffered pbuffer so supposedly you can do it. I am just wondering if anyone else has ever tried to use one and got it to work in C or any other language. I am baffled.