3.2 Core Profile on Mac OS X (Mavericks)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

3.2 Core Profile on Mac OS X (Mavericks)

pdelirium
I can't seem to get any profile other than "2.1 (Compat profile, FBO, hardware)".  I've tried GLProfile.getMaxProgrammableCore(true) and GLProfile.get(GLProfile.GL3) but I just get the same 2.1 profile after calling createExternalGLContext().  Attached is the output of the test.sh script.  I'm trying to use JOGL with a SWT GLCanvas so it's possible I'm doing something wrong there.  If needed I can put together a minimal example.  test.sh output
Reply | Threaded
Open this post in threaded view
|

Re: 3.2 Core Profile on Mac OS X (Mavericks)

gouessej
Administrator
Hi

Does your problem occur even though you don't use an external context?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: 3.2 Core Profile on Mac OS X (Mavericks)

pdelirium
Well, I tried a quick test using AWT instead of SWT:

        GLProfile glp = GLProfile.getMaxProgrammableCore(true);
        GLCapabilities caps = new GLCapabilities(glp);
        GLCanvas canvas = new GLCanvas(caps);

        Frame frame = new Frame("AWT Window Test");
        frame.setSize(300, 300);
        frame.add(canvas);
        frame.setVisible(true);
        System.out.println(canvas);

Strangely it doesn't actually open the window but does output:

AWT-GLCanvas[Realized false,
        jogamp.opengl.GLFBODrawableImpl,
        Factory   jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@60f82f98,
        handle    0x7f964bdf71b0,
        Drawable size 300x278,
        AWT pos 0/22, size 300x278,
        visible true, displayable true, showing true,
        AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 69674880, unitID 0, awtDevice sun.awt.CGraphicsDevice@35f983a6, handle 0x0], idx 0],
        chosen    GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL3/GL3.hw], offscr[fbo]],
        requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL3/GL3.hw], on-scr[.]],
        CGLGraphicsConfig[dev=69674880,pixfmt=0],
        encapsulated 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, dbl, mono  , hw, GLProfile[GL3/GL3.hw], offscr[fbo]],
        requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL3/GL3.hw], on-scr[.]]]]]

In my SWT version if I print the profile returned by getMaxProgrammableCore() it does say "GLProfile[GL3/GL3.hw]".
Reply | Threaded
Open this post in threaded view
|

Re: 3.2 Core Profile on Mac OS X (Mavericks)

jmaasing
pdelirium wrote
Well, I tried a quick test using AWT instead of SWT:

        GLProfile glp = GLProfile.getMaxProgrammableCore(true);
        GLCapabilities caps = new GLCapabilities(glp);
        GLCanvas canvas = new GLCanvas(caps);

        Frame frame = new Frame("AWT Window Test");
        frame.setSize(300, 300);
        frame.add(canvas);
        frame.setVisible(true);
        System.out.println(canvas);

Strangely it doesn't actually open the window but does output:
I tried that code (the awt) on my MacBook Pro (Graphics  AMD Radeon HD 6770M 1024 MB)  and not only did the window show but it printed:

AWT-GLCanvas[Realized true,
        jogamp.opengl.GLFBODrawableImpl,
        Factory   jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory@47f6473,
        handle    0x7ff7dbe55a30,
        Drawable size 300x278,
        AWT pos 0/22, size 300x278,
        visible true, displayable true, showing true,
        AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection Display 724065167, unitID 0, awtDevice sun.awt.CGraphicsDevice@15975490, handle 0x0], idx 1],
        chosen    GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL4/GL4.hw], offscr[fbo]],
        requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL4/GL4.hw], on-scr[.]],
        CGLGraphicsConfig[dev=724065167,pixfmt=0],
        encapsulated MacOSXCGLGraphicsConfiguration[DefaultGraphicsScreen[MacOSXGraphicsDevice[type .macosx, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[]], idx 1],
        chosen    GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL4/GL4.hw], offscr[fbo]],
        requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL4/GL4.hw], on-scr[.]]]]]
Reply | Threaded
Open this post in threaded view
|

Re: 3.2 Core Profile on Mac OS X (Mavericks)

pdelirium
In reply to this post by pdelirium
Just to clarify a bit... I've trying to use org.eclipse.swt.opengl.GLCanvas which is why I'm using createExternalGLContext().  It works fine and I can draw using GL 2.1 functions.

I just realized there is a com.jogamp.opengl.swt.GLCanvas but I can't seem to get it to work at all.  Calling getGL() always returns null.  toString() on the canvas gives me:

Req Profile: GLProfile[GL3/GL3.hw]
SWT-GLCanvas[Realized false,
        null-drawable,
        Factory   null,
        handle    0x0,
        Drawable size -1x-1,
        SWT size 320x299]

Is there a complete example using com.jogamp.opengl.swt.GLCanvas anywhere that I can try?

Reply | Threaded
Open this post in threaded view
|

Re: 3.2 Core Profile on Mac OS X (Mavericks)

Sven Gothel
Administrator
In reply to this post by pdelirium
On 07/13/2014 07:58 PM, pdelirium [via jogamp] wrote:
> I can't seem to get any profile other than "2.1 (Compat profile, FBO,
> hardware)".  I've tried GLProfile.getMaxProgrammableCore(true) and
> GLProfile.get(GLProfile.GL3) but I just get the same 2.1 profile after calling
> createExternalGLContext().  

"createExternalGLContext()" purpose is to hook to an externally created OpenGL
context, pls check w/ API doc.

We attempt a few methods to figure out the GLProfile here,
but cannot be sure.

For full SWT examples, pls check JOGL's junit tests,
the are in 'jogl/src/test' and include 'SWT' in their name,
e.g. : find jogl/src/test -name \*SWT\*.java

~Sven


signature.asc (894 bytes) Download Attachment