[FIXED] PBuffer exception with multisampling

Started by jouvieje, March 15, 2012, 22:18:24

Previous topic - Next topic

jouvieje

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:
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:
new Pbuffer(64, 64, new PixelFormat().withSamples(4), null);

it fails with the exception:
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 ?

digitalchaotics

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.

spasi


jouvieje

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 !

spasi

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.

jouvieje

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.