Double buffered pbuffer

Hi all,

has anyone been able to create a double buffered pbuffer? I searched the forum for a similar problem and at this topic (http://www.java-gaming.org/forums/index.php?topic=5032.0) GTW has reported the same problem, but it remained unclear whether pbuffers can be double buffered when using jogl. I’m using JSR231, and if I try to enable double buffering at the pbuffer GLcapabilities, my app crashes and I get the following report:



Stack: [0x037d0000,0x03810000),  sp=0x0380f274,  free space=252k
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.sun.opengl.impl.windows.WGLExtImpl.dispatch_wglCreatePbufferARB1(JIIILjava/lang/Object;IJ)J+0
j  com.sun.opengl.impl.windows.WGLExtImpl.wglCreatePbufferARB(JIII[II)J+103
j  com.sun.opengl.impl.windows.WindowsPbufferGLDrawable.createPbuffer(JLcom/sun/opengl/impl/windows/WGLExt;)V+1026
j  com.sun.opengl.impl.windows.WindowsPbufferGLDrawable.<init>(Ljavax/media/opengl/GLCapabilities;IILcom/sun/opengl/impl/windows/WindowsGLDrawable;Lcom/sun/opengl/impl/windows/WGLExt;)V+167
j  com.sun.opengl.impl.windows.WindowsGLDrawableFactory$2.run()V+59
j  com.sun.opengl.impl.windows.WindowsGLDrawableFactory.maybeDoSingleThreadedWorkaround(Ljava/lang/Runnable;)V+20
j  com.sun.opengl.impl.windows.WindowsGLDrawableFactory.createGLPbuffer(Ljavax/media/opengl/GLCapabilities;Ljavax/media/opengl/GLCapabilitiesChooser;IILjavax/media/opengl/GLContext;)Ljavax/media/opengl/GLPbuffer;+47

Thanks in advance
N

Why do you want a double-buffered pbuffer? Pbuffers, being offscreen, don’t need double-buffering because the intermediate rendering results aren’t visible on the screen until you explicitly copy them there.

I’m noticing a behavior that I’m not sure its the right one. I render two quads, the one hiding the other (they are not coincident, so z fighting is not the problem). The quad in front uses a texture produced by the pbuffer. When I move the camera quickly towards/away from the quads, sometimes the quad in behind becomes visible for a split second before the quad in front is rendered. I suspect that this might be because of the pbuffer produced texture,and a cause might be the single buffered pbuffer.

Your drivers are supposed to support doublebuffered pbuffers. My nvidia card does just fine but the ATI card in my laptop does not. After trying the newest drivers from ATI I eventually loaded up the orginal drivers from gateway and they actually could almost do doublebuffered pbuffers correctly but there were lots of lines in the frame that shouldn’t have been there. It should work but if it doesn’t then it is probably the drivers fault. Take a look at framebuffer objects if you card supports it. They will probably be better supported than pbuffers.

Yeah, never had a problem with nVidia drivers.

For ATI cards, this Java3D Issue may be of some interest:
https://java3d.dev.java.net/issues/show_bug.cgi?id=100

I don’t think the single-buffered pbuffer is the issue in your application. Even if it were, you can and probably should guarantee that all OpenGL work related to the pbuffer has completed by doing a glFinish() at the end of your GLEventListener’s display() callback for the pbuffer.

Well, my card is an ATI Mobility Radeon 9000, and it seems, considering GKW’s post, that it doesn’t support double buffered pbuffers. I tried to use the newest available drivers, but no luck. It also doesn’t support frame buffers. I want to be able to draw vector graphics on an already existing texture image, and pbuffers seem to be the only solution, considering the fact that i want to be compatible to as many older graphics cards as possible. I could use multitexturing and continuously draw an image with the vector graphics and send it as a texture to blend with the original texture, but that is too slow (sending all the time unneeded pixels to the GPU). Any suggestions there?

Considering the two quads problem I mentioned, and thought as a consequence of unsupported double buffered pbufers, I’ll look it up as Ken suggests, since double buffering seems not to be the issue. I’ll try glFinish to see if it improves things.