How to force core profile

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

How to force core profile

chrtom
Is there a way to tell JOGL to use the core profile (and avoid the compatibility profile). I tried GLProfile.get(GLProfile.GL3), GLProfile.get(GLProfile.GL4), and GLProfile.getDefault(). But I always end up with a:

>> Native[GL4bc true [4.2 (Compatibility profile, arb, ES2 compatible, FBO, hardware)]

This is not a "core" profile. In native C/C++ and freeGLUT I'm able to select the core profile, which I need explicitly, because the profiles have slightly different behavior in terms of rendering when using glVertexAttrib without any VAO bound.

How can I force the core profile in JOGL?

Thanks for any advice!
Reply | Threaded
Open this post in threaded view
|

Re: How to force core profile

gouessej
Administrator
Hi

Have you tried GLProfile.getMaxProgrammable(true)?

Edit.: Using GL4 should work. Which hardware do you use? It would be fine to have a method to get only forward compatible profiles.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: How to force core profile

Sven Gothel
Administrator
On 02/21/2013 01:00 PM, gouessej [via jogamp] wrote:
> Hi
>
> Have you tried GLProfile.getMaxProgrammable(true)?

That was including and favoring compatibility profiles ..

Good idea though, just committed:

http://jogamp.org/git/?p=jogl.git;a=commit;h=fe0a2ad6f702aee71ea06f9da19ec9fd696d4095

commit fe0a2ad6f702aee71ea06f9da19ec9fd696d4095
Author: Sven Gothel <[hidden email]>
Date:   Thu Feb 21 13:24:05 2013 +0100

    GLProfile: Adding convenient query for highest programmable core only GL profile
   
    As suggested @ http://forum.jogamp.org/How-to-force-core-profile-tp4028307.html
   
    However, one could always get a dedicated core profile via:
      - GLProfile.get(GLProfile.GLES2)
      - GLProfile.get(GLProfile.GL3)
      - GLProfile.get(GLProfile.GL4)
   
    .. etc



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to force core profile

chrtom
Thanks for your comments!

I'm on AMD 7870. And no, no matter what I call, GLProfile.get(GLProfile.GL3) or GLProfile.get(GLProfile.GL4), I'm NOT getting a "core" profile, but the default:

[OpenGL 4.2, options 0x303, 4.2 (Compatibility profile, arb, ES2 compatible, FBO, hardware) - 4.2.11903 Compatibility Profile Context, this 0x4c31ca45, handle 0x7f82d4196360, jogamp.opengl.gl4.GL4bcImpl@58d69f17

Maybe this has something to do with GLContext.PROFILE_ALIASING ??
Reply | Threaded
Open this post in threaded view
|

Re: How to force core profile

Sven Gothel
Administrator
On 02/22/2013 01:19 AM, chrtom [via jogamp] wrote:

> Thanks for your comments!
>
> I'm on AMD 7870. And no, no matter what I call, GLProfile.get(GLProfile.GL3)
> or GLProfile.get(GLProfile.GL4), I'm NOT getting a "core" profile, but the
> default:
>
> [OpenGL 4.2, options 0x303, 4.2 (Compatibility profile, arb, ES2 compatible,
> FBO, hardware) - 4.2.11903 Compatibility Profile Context, this 0x4c31ca45,
> handle 0x7f82d4196360, jogamp.opengl.gl4.GL4bcImpl@58d69f17
>
> Maybe this has something to do with GLContext.PROFILE_ALIASING ??
>
Yes and that has been removed lately to actually support core only
profiles - at least we keep compatible and core separate now.

Try:
  http://jogamp.org/deployment/archive/master/gluegen_640-joal_404-jogl_921-jocl_752/

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to force core profile

chrtom
Thanks a lot for the quick actions taken! I've tested the build you suggested:

>  http://jogamp.org/deployment/archive/master/gluegen_640-joal_404-jogl_921-jocl_752/

With this build GLProfile.get(GL.Profile.GL4) and GLProfile.get(GL.Profile.GL3) return "core" profiles as expected.

Thanks again!