Login  Register

Re: How to Draw a Smooth Curve through a Set of 2D Points

Posted by mahesh on Mar 01, 2017; 6:59am
URL: https://forum.jogamp.org/How-to-Draw-a-Smooth-Curve-through-a-Set-of-2D-Points-tp4037677p4037697.html

I changed main function to  this
public static void main(String[] args) {
        GLCapabilities caps = new GLCapabilities(GLProfile.get(GLProfile.GL2ES2));
        caps.setAlphaBits(4);
	GLWindow glWindow = GLWindow.create(caps);
        glWindow.setSize(800,400);
        glWindow.setTitle("JogAmp JOGL Graph API nurbs demo");
        glWindow.setVisible(true);
        System.setProperty( "Djogl.debug.GLSLCode", "true");
        System.setProperty( "Djogl.debug.DebugGL", "true");
     
         GLWindow.main(args);
        glWindow.addGLEventListener(new GraphNurbs() /* GLEventListener */);

        Animator animator = new Animator();
        animator.add(glWindow);
        animator.start();

    }


The output is

Swap Interval  1
GL Profile     GLProfile[GL4bc/GL4bc.hw]
GL Version     4.3 (Compat profile, arb, compat[ES2, ES3], FBO, hardware) - 4.3.0 - Build 10.18.14.4414 [GL 4.3.0, vendor 10.18.14 (- Build 10.18.14.4414)]
Quirks         [NoDoubleBufferedBitmap, NoSurfacelessCtx]
Impl. class    jogamp.opengl.gl4.GL4bcImpl
GL_VENDOR      Intel
GL_RENDERER    Intel(R) HD Graphics 4400
GL_VERSION     4.3.0 - Build 10.18.14.4414
GLSL           true, has-compiler-func: true, version: 4.30 - Build 10.18.14.4414 / 4.30.0
GL FBO: basic true, full true
GL_EXTENSIONS  208
GLX_EXTENSIONS 0
-----------------------------------------------------------------------------------------------------
Requested: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
Chosen   : GLCaps[wgl vid 7 arb: rgba 8/8/8/8, opaque, accum-rgba 16/16/16/16, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL4bc/GL4bc.hw], on-scr[.]]
GL impl. class jogamp.opengl.gl4.GL4bcImpl
GL4ES3 retrieved, impl. class jogamp.opengl.gl4.GL4bcImpl
GL3 retrieved, impl. class jogamp.opengl.gl4.GL4bcImpl
XXX: Cubic: 4: [ID: 2147483647, onCurve: false: p 7.0, 15.0, 0.0, t 0.0, 0.0, 0.0], 5: [ID: 2147483647, onCurve: false: p 6.0, 8.0, 0.0, t 0.0, 0.0, 0.0]