From owner-freebsd-java@freebsd.org Mon May 16 13:27:52 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41FCCB3D683 for ; Mon, 16 May 2016 13:27:52 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB81E109D for ; Mon, 16 May 2016 13:27:51 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-lb0-x22e.google.com with SMTP id jj5so49978271lbc.0 for ; Mon, 16 May 2016 06:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=O/JDsRVmyzkflo416YDGvOrCt+4pJlKEBDmpo7ylj5M=; b=IIPUj8wfIJLrIoUzGTGSLjKgtfLHyugU9EIAS6NGI/prAMEvhCxAxWHqe9bt17nuqp hRbsNTNc4VvMVAG22qHq61BSHG7GGEw9v9DTLKcIn5K0PN2iBMAZycRerF8K+Nt+kwF6 STVlXyZZcDubYAsU8H8+JbnF+BCuws277J8/IRfcigntPHTK61b3Nez/15vqo26JBMwh JIjQPzc680HK2CgBVRkqwlGhdGTxv2XkxLa96EkrdHZF3UtoXzjGwO0STdCUR7GYoeTP l1LLqjlgX99c3Q3BOIL0SzsQCeB0qDltU7s8pXeC6P2PHp6UPN8XX9AScYBaogGx/yFV ctRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=O/JDsRVmyzkflo416YDGvOrCt+4pJlKEBDmpo7ylj5M=; b=czIeVik8RvGgm2ghxoRvegO42Qws+mpch2BH55gkKPtj7iuCsqRDP0Qe9LA/2m2h/1 dGIEm9Vf8Lkfm8d6mM1+tgwCXy6ywmkXfwTw4GRsUZHe8r8Yysw0mDtZXHXJTu1qakne x+puigM6fZv7kmwggDEDia/t4PO8t3m3CC8dYhRJXr/cJRrYnynXtwyBS8H3ICKzSJg7 vYaXC2K1Y+M38QI+Uf86nB1unWeASHq/Xuyv0JlC5Ywrmmg1JPwqUwvxILgeItxD4kc2 katBJLcgAnD5vdK0O08VDA2mQwJ5rAbgLLpcW98tQg7ejymxA4yAslhoDKE+ocIb7OXG 8w2Q== X-Gm-Message-State: AOPr4FVhZKgzeA3TIhE4BwlZs+Ef4Tduhs274YNWOpgPA6mFXo+SP6bcDVqu4lcFpKK+RM1cciH3mSMpzToEfg== MIME-Version: 1.0 X-Received: by 10.112.220.6 with SMTP id ps6mr11420375lbc.16.1463405269467; Mon, 16 May 2016 06:27:49 -0700 (PDT) Received: by 10.25.152.83 with HTTP; Mon, 16 May 2016 06:27:49 -0700 (PDT) In-Reply-To: <201605161319.u4GDJNkM019165@mech-as222.men.bris.ac.uk> References: <201605161319.u4GDJNkM019165@mech-as222.men.bris.ac.uk> Date: Mon, 16 May 2016 16:27:49 +0300 Message-ID: Subject: Re: help fix JOGL errors/warnings From: Michael Zhilin To: mexas@bris.ac.uk Cc: freebsd-java@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2016 13:27:52 -0000 Hi, Do you have tried graphics/jogl also? Thanks! On Mon, May 16, 2016 at 4:19 PM, Anton Shterenlikht wrote: > Hi > > I'm trying to follow this JOGL tutorial: > https://sites.google.com/site/justinscsstuff/jogl-tutorial-2 > > I can successfully create an empty window with AWT, > although I get a warning: > > $ echo $CLASSPATH > > /usr/local/share/java/classes/jogl2.jar:/usr/local/share/java/classes/gluegen2.jar:/usr/local/share/java/classes/gluegen2-rt.jar:. > $ cat SimpleScene.java > > import java.awt.Frame; > import java.awt.event.WindowAdapter; > import java.awt.event.WindowEvent; > import javax.media.opengl.*; > import javax.media.opengl.awt.GLCanvas; > > public class SimpleScene { > public static void main(String[] args) { > GLProfile glp = GLProfile.getDefault(); > 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); > > // by default, an AWT Frame doesn't do anything when you click > // the close button; this bit of code will terminate the program > when > // the window is asked to close > frame.addWindowListener(new WindowAdapter() { > public void windowClosing(WindowEvent e) { > System.exit(0); > } > }); > } > } > > $ > > $ javac SimpleScene.java > warning: Supported source version 'RELEASE_6' from annotation processor > 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source > '1.8' > 1 warning > $ > > What is this warning about? > Is the example not conforming with my JOGL version? > > $ pkg info -xo jogl > jogamp-jogl-2.2.4 graphics/jogamp-jogl > > Anyway, when I then run > > $ java SimpleScene > > I get an empty window. > > However, when I try to create a window with NEWT: > (lower down on the same page: > https://sites.google.com/site/justinscsstuff/jogl-tutorial-2 ) > > I get: > > $ cat SimpleScene.java > > import javax.media.opengl.*; > import com.jogamp.newt.event.WindowAdapter; > import com.jogamp.newt.event.WindowEvent; > import com.jogamp.newt.opengl.GLWindow; > > public class SimpleScene { > public static void main(String[] args) { > GLProfile glp = GLProfile.getDefault(); > GLCapabilities caps = new GLCapabilities(glp); > > GLWindow window = GLWindow.create(caps); > window.setSize(300, 300); > window.setVisible(true); > window.setTitle("NEWT Window Test"); > > window.addWindowListener(new WindowAdapter() { > public void windowDestroyNotify(WindowEvent arg0) { > System.exit(0); > }; > }); > } > } > > $ javac SimpleScene.java > warning: Supported source version 'RELEASE_6' from annotation processor > 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor' less than -source > '1.8' > 1 warning > $ java SimpleScene > X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): > 2/2, reusable (open, marked uncloseable): 0, pending (open in creation > order): 2) > X11Util: Open X11 Display Connections: 2 > X11Util: Open[0]: NamedX11Display[:0.0, 0x8d6e22000, refCount 1, > unCloseable false] > X11Util: Open[1]: NamedX11Display[:0.0, 0x8d6e23400, refCount 1, > unCloseable false] > $ > > The window opens momentarity and then shuts down automatically. > Is this an expected behaviour? > > I then try to run a moving triangle example, > bottom of this page: > https://sites.google.com/site/justinscsstuff/jogl-tutorial-3 > > I get this error: > > SimpleScene.java:34: error: incompatible types: FPSAnimator cannot be > converted to Animator > Animator animator = new FPSAnimator(canvas, 60); > ^ > 1 error > > Again, perhaps the example is out of date, > or the other way round - the JOGL version installed > is out of date? > > Thanks > > Anton > _______________________________________________ > freebsd-java@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >