Hi !
I’m having troubles setting up a AwtPanelsContext with multisampling. An easy way to reproduce the problem is to add this line in the TestAwtPanels sample :
settings.setSamples(8);
Adding this line produce the following exception at runtime :
org.lwjgl.LWJGLException: Could not create pixel format
at org.lwjgl.opengl.MacOSXPeerInfo.nChoosePixelFormat(Native Method)
at org.lwjgl.opengl.MacOSXPeerInfo.choosePixelFormat(MacOSXPeerInfo.java:58)
at org.lwjgl.opengl.MacOSXPeerInfo.<init>(MacOSXPeerInfo.java:53)
at org.lwjgl.opengl.MacOSXPbufferPeerInfo.<init>(MacOSXPbufferPeerInfo.java:46)
at org.lwjgl.opengl.MacOSXDisplay.createPbuffer(MacOSXDisplay.java:553)
at org.lwjgl.opengl.Pbuffer.createPbuffer(Pbuffer.java:234)
at org.lwjgl.opengl.Pbuffer.<init>(Pbuffer.java:219)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.initInThread(LwjglOffscreenBuffer.java:79)
at com.jme3.system.lwjgl.LwjglOffscreenBuffer.run(LwjglOffscreenBuffer.java:154)
at java.lang.Thread.run(Thread.java:745)
```
breaking before this native function shows the following values :
```
pixel_format = {PixelFormat@1360}
- bpp = 24
- alpha = 0
- depth = 24
- stencil = 0
- samples = 8
- colorSamples = 0
- num_aux_buffers = 0
- accum_bpp = 0
- accum_alpha = 0
- stereo = false
- floating_point = false
- floating_point_packed = false
- sRGB = false
gl32 = false
use_display_bpp = false
support_window = false
support_pbuffer = true
double_buffered = false
```
I'm using the latest version of jme3 from the github repository on OSX.
I found this old post which is a similar issue : http://hub.jmonkeyengine.org/t/exception-when-setting-anti-alias-samples-in-canvas-mode/18498/2 but it's about JmeCanvasContext. In my case FXAA is not an acceptable fallback for antialiasing, I really need MSAA.
I hope you can help me ! :smile:
EDIT : I can't reproduce the error on Windows 10 so it seems to be osx-only. maybe something related to lwjgl rather than jme...