Created attachment 616 [details] Java program to reproduce. We noticed that, on one person's Mac with an NVIDIA card, the first frame in a context is not correctly antialiased. We create a GLJPanel, asking for 8 samples. Any redrawing corrects it. There are some similarities to Bug 841, though we don't get junk in the first frame. What we do see is "partial antialiasing". What I mean by that is that there are pixels drawn that would not have been touched with 0 samples, but which are fully colored. It is possible this is from some other issue. We reproduced it in the attached program. The mac uses an "NVIDIA GeForce GT 330M OpenGL Engine". Version: "2.1 NVIDIA-8.24.13 310.90.9.05f01". OS X 10.9.3 When we use a GLCanvas instead of GLJPanel, the first frame is correct.
Also related: Bug 975.
Comparing results w/ already existing test cases: com.jogamp.opengl.test.junit.jogl.acore.TestGLReadBuffer01GLJPanelAWT com.jogamp.opengl.test.junit.jogl.acore.TestGLReadBuffer01GLCanvasAWT com.jogamp.opengl.test.junit.jogl.acore.TestGLReadBuffer01GLWindowNEWT
Reproduced: GNU/Linux NV: No artifacts (proper MSAA in 1st frame) <http://jogamp.org/files/screenshots/bug1020/linux-nvidia/> OSX (any version): - UserVertFlip: No MSAA in 1st frame - DefVertFlip: Incomplete MSAA in 1st frame <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-NvidiaGeForce320M/>
Reproduced on OSX Nvidia GT650M <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-IntelHD4000_NvidiaGT650M/> Description: See 1st frame (user-flip, aliasing artifacts): <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-IntelHD4000_NvidiaGT650M/TestGLReadBuffer01GLJPanelAWT.test11_MSAA8_UsrFlip-n0000-awt-usr000-GL2___-hw-fbobject-Bdbl-Frgb__Irgba8888-D24-St00-Sa08_default-0640x0480.png> where 2nd frame is fine: <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-IntelHD4000_NvidiaGT650M/TestGLReadBuffer01GLJPanelAWT.test11_MSAA8_UsrFlip-n0001-awt-usr000-GL2___-hw-fbobject-Bdbl-Frgb__Irgba8888-D24-St00-Sa08_default-0640x0480.png> ...
Reproduction on OSX Nvidia GT650M (Comment 4) was done on a Macbook Pro w/ Intel HD4000 and NV Optimus, Optimus enabled. Forcing the Intel HD4000 (disabling Optimus with tool gfxCardStatus <http://gfx.io/>) shows _CORRECT_ results: <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-IntelHD4000/> 1st Frame: <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-IntelHD4000/TestGLReadBuffer01GLJPanelAWT.test11_MSAA8_UsrFlip-n0000-awt-usr000-GL2___-hw-fbobject-Bdbl-Frgb__Irgba8888-D24-St00-Sa08_default-0640x0480.png> 2nd Frame: <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-IntelHD4000/TestGLReadBuffer01GLJPanelAWT.test11_MSAA8_UsrFlip-n0001-awt-usr000-GL2___-hw-fbobject-Bdbl-Frgb__Irgba8888-D24-St00-Sa08_default-0640x0480.png>
Excessive review of our FBO MSAA blit -> FBO Sink and GLJPanel resulted in finding no errors. Due to result of Comment 5 (working IntelHD 4000) I conclude this is a driver bug of OSX/Nvidia for GT650M and 320M. Remedy would be to render the initial frame twice .. We shall contemplate whether this is worth another quirk entry for OSX/Nvidia .. ?
Further analysis of the OSX/NV bug shows that this is related to a never-written FBO blit. If initializing the FBO w/ glClear(GL_COLOR_BUFFER) this issue goes away. Currently we cannot inject this workaround into FBObject since it is too low-level, i.e. we don't know when it's first bind operation happens - i.e. user is ready. It is possible to inject this to the GLFBOffscreenDrawable though ..
ab07820e346f23aabc9d9364b7205017422cfaed OSX/Nvidia's FBO needs to be cleared before blitting, otherwise first MSAA frame lacks antialiasing. GLFBODrawableImpl.initialize(..) can clear GL.GL_COLOR_BUFFER_BIT and GL.GL_DEPTH_BUFFER_BIT, if used. FBObject cannot clear the buffer(s) due to it's low-level API, i.e. it cannot know when the first bind occurs _after_ user completed FBO setup (attaching buffers). Hence plain FBObject usage required manual injection of glClear(..) after setup as demonstrated in GLJPanel. We may need to elaborate in this case, i.e. add an FBObject API entry like 'fbo.postInitNotify()'. See results: <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-IntelHD4000_NvidiaGT650M-FIXED/> 1st Frame: <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-IntelHD4000_NvidiaGT650M-FIXED/TestGLReadBuffer01GLJPanelAWT.test11_MSAA8_UsrFlip-n0000-awt-usr000-GL2___-hw-fbobject-Bdbl-Frgb__Irgba8888-D24-St00-Sa08_default-0640x0480.png> 2nd Frame: <http://jogamp.org/files/screenshots/bug1020/osx10_9_4-IntelHD4000_NvidiaGT650M-FIXED/TestGLReadBuffer01GLJPanelAWT.test11_MSAA8_UsrFlip-n0001-awt-usr000-GL2___-hw-fbobject-Bdbl-Frgb__Irgba8888-D24-St00-Sa08_default-0640x0480.png>