Hello good people of jogamp. I hope you can help me with my question.
I do java programming from the command line and I have problems installing Jogl 2. In the shell of Ubuntu 12.04 I have succesfully installed Jogl with % sudo apt-get install libjogl-java<enter> I can compile and run many code examples that I pick from the internet. But when I run this code: System.out.println("OpenGL Version: " + gl.glGetString(GL.GL_VERSION)); it outputs: OpenGL Version: 2.1 Mesa 8.0.4 I want to work with OpenGL ES and/or withOpenGL 3. I have excellent books on OpenGL and I want to study the language. What % sudo apt-get install <name> do you suggest and waht changes should I make to PATH and CLASS_PATH? Thank you! X |
Administrator
|
Maybe install another driver. Which graphics card do you use?
libjogl-java seems to rely on JOGL 1.1.1. Please rather use JOGL 2.0, you can install and run it in command line, it is explained in our wiki, don't try to use pre-packaged versions, use the one provided by the JogAmp Foundation, the latest (today, November 20th, 2012) release candidate is here.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by Agent Mulder
You can do:
wget http://jogamp.org/deployment/v2.0-rc11/archive/jogamp-all-platforms.7z 7z x http://jogamp.org/deployment/v2.0-rc11/archive/jogamp-all-platforms.7z javac -cp jar/jogl-all.jar:jar/gluegen-rt.jar YourDemo.java java -cp jar/jogl-all.jar:jar/gluegen-rt.jar:. YourDemo.java
Julien Gouesse | Personal blog | Website
|
Running
% wget http://jogamp.org/deployment/v2.0-rc11/archive/jogamp-all-platforms.7z &> error.txt % 7z x http://jogamp.org/deployment/v2.0-rc11/archive/jogamp-all-platforms.7z &>> error.txt % javac -cp jar/jogl-all.jar:jar/gluegen-rt.jar YourDemo.java &>> error.txt % java -cp jar/jogl-all.jar:jar/gluegen-rt.jar:. YourDemo.java &>> error.txt gives me: --2012-11-20 15:30:18-- http://jogamp.org/deployment/v2.0-rc11/archive/jogamp-all-platforms.7z Resolving jogamp.org (jogamp.org)... 46.4.52.69, 2a01:4f8:140:1225::1:1 Connecting to jogamp.org (jogamp.org)|46.4.52.69|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 17113424 (16M) [text/plain] Saving to: `jogamp-all-platforms.7z.2' 16550K .......... .......... .......... .......... .......... 99% 1.37M 0s 16600K .......... .......... .......... .......... .......... 99% 1.32M 0s 16650K .......... .......... .......... .......... .......... 99% 1.30M 0s 16700K .......... .. 100% 1.51M=12s 2012-11-20 15:30:31 (1.33 MB/s) - `jogamp-all-platforms.7z.2' saved [17113424/17113424] 7-Zip 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs) Error: there is no such archive javac: file not found: YourDemo.java Usage: javac <options> <source files> use -help for a list of possible options Exception in thread "main" java.lang.NoClassDefFoundError: YourDemo/java Caused by: java.lang.ClassNotFoundException: YourDemo.java at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: YourDemo.java. Program will exit. |
Administrator
|
You have to write your own demo, call it "YourDemo.java" and put it into the current directory, it was just an example. Sorry for the confusion.
Julien Gouesse | Personal blog | Website
|
I understand all that but I have a hard time finding a definite Jogl-implementation. Is Jogl still the right choice for programming OpenGL with Java? What are the alternatives for Ubuntu users? It must be OpenGL but I am not sure what language to use.
Greetings X |
Administrator
|
What's wrong? Of course JOGL is the way to go, it is actively maintained, that's not our fault if package maintainers prefer using an obsolete version. There are tons of examples in our repository, we have a wiki, lots of unit tests.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by Agent Mulder
I don't understand, I just gave you the archive containing all JARs, you just have to copy paste an example from Wikipedia or from our repository and modify the class name. If it is too difficult for you, just give up programming. I'm sorry, I try to contribute to JOGL since 2006, I ported several engines, I fixed a few bugs, I wrote some bug reports, I updated the user guide... We do our best, JogAmp is actively maintained, we are more and more contributors, some documentation, lots of examples, the whole is heavily tested. Sorry to disappoint you, JOGL is the most reliable binding for OpenGL & OpenGL-ES and I already used some other bindings in some other languages, I'm under GNU Linux too.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by Agent Mulder
I'm really sorry but you come on the official forum of JOGL to ask for alternatives. I'm tired and completely fed up. I'm completely upset, it's nonsensical. What do you expect? I have told lots of developers to switch to JOGL 2.0 since 2009, I had to port lots of code by myself. Some webmasters are just too lazy to port their tutorials by themselves, some of them even copy outdated libraries and claim they are "recent". I cannot force them to stop being nasty people but here nice guys have spent a lot of time in maintaining a great set of APIs. Honestly, maybe you can find other OpenGL bindings but they are slower, less cross-platform and less actively maintained.
Julien Gouesse | Personal blog | Website
|
In reply to this post by Agent Mulder
I am looking for someone to explain to me how to install Jogl on my Ubuntu-system because I cannot figure it out on my own. Since I want to experiment with OpenGL ES I need a stable reference implementation that I can program against.
I understand that you have done a lot for Jogl. Maybe you know people who work OpenGL ES. How about a java-implementation called Jes? :) |
Administrator
|
The install is almost the same for all operating systems and for most of third party libraries written in Java, take the archive (7z), extract the JARs from it, put them into the classpath and don't forget to use this classpath correctly when compiling and executing your application(s). I gave you a link to our wiki and to a tutorial explaining in details how to install JOGL, what is missing? I gave you several command lines to install JOGL, compile and run an application using it. JOGL 2.0 supports OpenGL-ES: http://jogamp.org/jogl/www/
JOGL 2.0 is stable. We work for OpenGL-ES too. Several years ago, their were 2 separate bindings, JOGL 1 and JOGL-ES but they have been merged into one, JOGL 2.0. JOGL 2.0 has an homogeneous support of both OpenGL and OpenGL-ES. When you want to use the latter rather than the former, you simply have to get a specialized GL implementation: final GL2ES2 gl = GLContext.getCurrentGL().getGL2ES2(); There is no specific install for Ubuntu, the general install just works.
Julien Gouesse | Personal blog | Website
|
Administrator
|
In reply to this post by Agent Mulder
Copy this example into the file JoglExample.java.
Then do: wget http://jogamp.org/deployment/v2.0-rc11/archive/jogamp-all-platforms.7z 7z x http://jogamp.org/deployment/v2.0-rc11/archive/jogamp-all-platforms.7z javac -cp jar/jogl-all.jar:jar/gluegen-rt.jar JoglExample.java java -cp jar/jogl-all.jar:jar/gluegen-rt.jar:. JoglExample
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |