Login  Register

GLOffscreenAutoDrawable problem with OSX Mavericks

Posted by Bricksnspace on Aug 11, 2014; 9:16am
URL: https://forum.jogamp.org/GLOffscreenAutoDrawable-problem-with-OSX-Mavericks-tp4032763.html

Hi all.

I'm developing a small Java application for LEGO builders that uses OpenGL to display LEGO bricks.
One function is to output an HTML document with bricks type and an embedded image for every brick in a list.
To do that, I use a GLOffscreenAutoDrawable to draw and capturing image with AWTGLReadBufferUtil.readPixelsToBufferedImage method.

It works fine with Linux and OpenJDK, with Windows XP and Seven, and with OSX 10.6.8 (Snow Leopard).
Using the same program with same data in a Mac with OSX Mavericks 10.9.4 (fully updated at today) program produces all solid black images.

I tried with JOGL v.2.1.3 and 2.2.0 and problem is identical.

Ask for "toString" of newly created off-screen buffer gets same result on OSX 10.6 and 10.9, only "instance id" and handles changes.

This is an example for 10.9:

FBOImpl[
    Helper: GLAnimatorControl: null, GLEventListeners num 0 [],
    Drawable: ResizeableImpl[Initialized false, realized true, texUnit 0, samples 0,
    Factory   jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@1c04ec59,
    Handle    0x7fa3fd84b720,
    Caps      GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, one, mono  , hw, GLProfile[GL2/GL2.hw], offscr[fbo]],
    fboI back 0, front 0, num 0,
    FBO front read 0, null,
    FBO back  write 0, null,
    Surface   WrappedSurface[ displayHandle 0x0
, surfaceHandle 0x7fa3fd84b720
, size 200x200
, UOB[ OWNS_SURFACE | OWNS_DEVICE | WINDOW_INVISIBLE ]
, MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[]], idx 0],
    chosen    GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, one, mono  , hw, GLProfile[GL2/GL2.hw], offscr[fbo]],
    requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, one, mono  , hw, GLProfile[GL2/GL2.hw], on-scr[.]]]
, surfaceLock <7c514f7f, 3e3a5a9c>[count 0, qsz 0, owner <NULL>]
, OSXDummyUpstreamSurfaceHook[pixel 200x200]
, upstreamSurface false ]],
    Context: null,
    UpstreamWidget: null]

Thank you for your work on JOGL.