Login  Register

Re: GL4 not working in JOGL macbook pro

Posted by kai.bachmann on Sep 05, 2019; 5:09am
URL: https://forum.jogamp.org/GL4-not-working-in-JOGL-macbook-pro-tp4040031p4040032.html

Hi,

by default the graphic driver of OSX will be started in compatibility mode which is 2.1

you have to request the higher version explicit

    final GLProfile profile = GLProfile.get(GLProfile.GL4);
    final GLCapabilities glcapabilities = new GLCapabilities(profile);
    final GLJPanel gljpanel = new GLJPanel(glcapabilities);


Am 05.09.2019 um 06:55 schrieb Felipe [via jogamp] <[hidden email]>:

I'm running the following code in a 2015 13'' macbook pro:

        public void display(GLAutoDrawable drawable) {
                try
                {
                        GL4 gl=(GL4)GLContext.getCurrentGL();
                       
                        String glVersion=gl.glGetString(GL_VERSION)  ;
                        System.out.println("glVersion="+glVersion);
                       
                        float bkg[] = { 0f, .5f, 0f, 0f };
                        FloatBuffer bkgBuffer = Buffers.newDirectFloatBuffer(bkg);
                        gl.glClearBufferfv(GL_COLOR, 0, bkgBuffer);
                        checkGLError(gl);
               
                }catch(Throwable th)
                {
                        Log.printCaughtExceptionMsg(th);
                        throw new Error(th);
                }
        }

The result for the line System.out.println("glVersion="+glVersion);
is:

glVersion=2.1 INTEL-12.8.38

My question is how can I force the glVersion to be 4.0 instead of 2.1?
I know I have to force JOGL to use the core profile but I do not know how.
Your help is greatly appreciated.




If you reply to this email, your message will be added to the discussion below:
http://forum.jogamp.org/GL4-not-working-in-JOGL-macbook-pro-tp4040031.html
To start a new topic under jogl, [hidden email]
To unsubscribe from jogamp, click here.
NAML

Mit freundlichen Grüßen


Kai Uwe Bachmann



E-mail Disclaimer:

Diese Email wurde von BKA, NSA und GCHQ auf Freiheit gefährdende Inhalte untersucht und zur späteren Verwendung in Geheimprozesse archiviert.

Bombe, Attentat, Sprengstoff, Terrorism, Nuclear, Infrastructure, Security, Safety, Attack, Toxic, Bacteria, Ebola, Influenza, Resistant, Airport, Telecommunications, Smart Power, Bridge, Pirates, Schweinefleisch, Trojan, Bart, Southwest, bridge, china, mexico, agro, car, incident