Hello Guest

[FIXED] PBuffer exception with multisampling

  • 5 Replies
  • 11597 Views
[FIXED] PBuffer exception with multisampling
« on: March 15, 2012, 22:18:24 »
I'm trying to use a PBuffer with multisampling, but it fails with an LWJGLException "Failed to find ARB pixel format 1 0"

I'm running windows 7 64 bits with an NVidia GTX 260 and tested with LWJGL 2.8.3 and 2.8.4-1595.

My graphic card support multisampling, and GL_MAX_SAMPLES return the value 16:
Code: [Select]
Pbuffer tmp = new Pbuffer(64, 64, new PixelFormat(), null);
tmp.makeCurrent();
int maxSamples = GL11.glGetInteger(GL30.GL_MAX_SAMPLES); // maxSamples is 16
tmp.destroy();

When I create the Pbuffer with non 0 samples:
Code: [Select]
new Pbuffer(64, 64, new PixelFormat().withSamples(4), null);it fails with the exception:
Code: [Select]
Caused by: org.lwjgl.LWJGLException: Failed to find ARB pixel format 1 0
at org.lwjgl.opengl.WindowsPbufferPeerInfo.nCreate(Native Method)
at org.lwjgl.opengl.WindowsPbufferPeerInfo.<init>(Unknown Source)
at org.lwjgl.opengl.WindowsDisplay.createPbuffer(Unknown Source)
at org.lwjgl.opengl.Pbuffer.createPbuffer(Unknown Source)
at org.lwjgl.opengl.Pbuffer.<init>(Unknown Source)
at org.lwjgl.opengl.Pbuffer.<init>(Unknown Source)
at org.lwjgl.opengl.Pbuffer.<init>(Unknown Source)
... 3 more
I've tried various size, samples and other values in PixelFormat but nothing was successfull.

Multisampling is working fine with Display and AWTGLCanvas, it's seem only broken for me with Pbuffer.
Also to check, I can use pbuffer with multisampling sucessfully with jogamp.

Did I miss something or can someone confirm this is a bug (or not) in recent build of lwjgl ?
« Last Edit: December 17, 2012, 22:33:03 by kappa »

Re: [BUG] PBuffer exception with multisampling
« Reply #1 on: December 16, 2012, 05:35:27 »
I have exactly the same error, same config, but with NVIDIA GTX 670.

Any clues?  I remember seeing something at some point that there was an error here on Windows-only, but it'd be really nice to get this fixed in the DLL.

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: [BUG] PBuffer exception with multisampling
« Reply #2 on: December 17, 2012, 12:07:41 »
This should be fixed in the next nightly.

Re: [FIXED] PBuffer exception with multisampling
« Reply #3 on: December 19, 2012, 12:18:23 »
I've tried with Jenkins build JWJGL #1901 which have reference to the github changes related to this bug (and #1902 too) but the problem is still there.

Looking at context.c in jenkins lwjgl-source-2.9.0.zip, it seems that it did not properly pick your github change.
See the line with WGL_DOUBLE_BUFFER_ARB which appears two times in Jenkins sources, very strange !

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: [FIXED] PBuffer exception with multisampling
« Reply #4 on: December 19, 2012, 12:55:20 »
Thanks, the problem was that I must have a made a mistake when committing the same change to the SVN repo. Fixed it now.

Please note that the builds from the Git repo go here. Not sure if these are ready to be used, last I heard it was still a work in progress. But at some point we'll stop committing to the SVN repo and use these instead.

Re: [FIXED] PBuffer exception with multisampling
« Reply #5 on: December 19, 2012, 13:23:07 »
Thanks for pointing me out the git build, but in fact there're not ready yet. The native dll are not properly builded.

I've tested the new win32/64 dll with your last fix and msaa now works with pbuffer. Thanks a lot.