Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  how good is JOGL2?  (Read 6608 times)
0 Members and 1 Guest are viewing this topic.
Offline deepthought
« Posted 2010-09-30 14:24:55 »

is Jogl2 any good? also, is it backwards compatible? can i import the JOGL2 jars instead of the normal ones and it'll still work?
I've heard it's also got a utility shader class. where can i get it if so?

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline bienator

Senior Member




OutOfCoffeeException


« Reply #1 - Posted 2010-09-30 16:06:34 »

JOGL2 is not backwards compatible but the changes are minor (almost only the initialization changed).

javadocs etc are linked on http://jogamp.org/jogl/www/

JOGL2 tutorials:
http://jogamp.org/wiki/index.php/Jogl_Tutorial

Offline deepthought
« Reply #2 - Posted 2010-09-30 21:45:06 »

what kind of init differences?

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej

« In padded room »



TUER


« Reply #3 - Posted 2010-10-01 12:44:47 »

what kind of init differences?
The main differences are below:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
// get the profile
GLProfile profile = GLProfile.getDefault();
// this allows us to set particular properties for the GLCanvas
GLCapabilities glCapabilities = new GLCapabilities(profile);
//instead of
GLCapabilities glCapabilities = new GLCapabilities();

final GL2 gl = GLContext.getCurrentGL().getGL2();
//instead of
final GL gl = GLContext.getCurrentGL();


Except that, the package names have changed, some packages have moved from com.sun to com.jogamp, it is quite trivial. Instead of using directly GL, lots of thing are in GL2, GL2GL3 or in another interfaces of this kind. Sorry for my approximative explanation.

JOGL 2 is good but it is still in beta, some things are broken.

Offline deepthought
« Reply #4 - Posted 2010-10-01 14:15:19 »

yeah about when are we gonna get an actual release? all i can find are autobuilds. and will i really have to include ALL those JARs in my build path?

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline bienator

Senior Member




OutOfCoffeeException


« Reply #5 - Posted 2010-10-01 15:04:24 »

please read the tutorial. Its everything explained in there.

Offline gouessej

« In padded room »



TUER


« Reply #6 - Posted 2010-10-01 15:27:58 »

yeah about when are we gonna get an actual release? all i can find are autobuilds. and will i really have to include ALL those JARs in my build path?
As bienator explained to you, all is explained there:
http://jogamp.org/wiki/index.php/Jogl_Tutorial

Offline deepthought
« Reply #7 - Posted 2010-10-05 14:17:33 »

i tried out the first example on the tutorial site an got the exception

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.jogamp.common.os.Platform.getPointerSizeInBitsImpl()I
   at com.jogamp.common.os.Platform.getPointerSizeInBitsImpl(Native Method)
   at com.jogamp.common.os.Platform.<clinit>(Platform.java:65)
   at com.jogamp.common.nio.Buffers.nativeOrder(Buffers.java:252)
   at com.jogamp.common.nio.Buffers.newDirectByteBuffer(Buffers.java:67)
   at com.jogamp.common.jvm.JVMUtil.<clinit>(JVMUtil.java:58)
   at javax.media.nativewindow.NativeWindowFactory.<clinit>(NativeWindowFactory.java:102)
   at javax.media.opengl.GLProfile.initProfiles(GLProfile.java:855)
   at javax.media.opengl.GLProfile.access$000(GLProfile.java:59)
   at javax.media.opengl.GLProfile$1.run(GLProfile.java:989)
   at java.security.AccessController.doPrivileged(Native Method)
   at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:987)
   at test.main(test.java:10)


what's wrong here

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline gouessej

« In padded room »



TUER


« Reply #8 - Posted 2010-10-05 14:26:07 »

You should put gluegen-rt native file (.so, .jnilib or .DLL) into your Java library path, this is explained in the tutorial:
Quote
For now, you only need to be concerned with the native library location for each JAR in the jogl-2.0 user library. For each JAR:

    * Click "Native library location" and then "Edit..." on the right.
    * Select "External Folder..." and navigate to the same directory all the JAR files for JOGL are in. This should be the "lib" directory inside the location you extracted the JOGL files.
    * Click "OK".
https://sites.google.com/site/justinscsstuff/jogl-tutorial-1

Offline deepthought
« Reply #9 - Posted 2010-10-05 21:34:23 »

I do have the native lib locations set! but it still didn't work!

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline deepthought
« Reply #10 - Posted 2010-10-05 21:59:48 »

P.S. maybe is the latest version broken? i'm gonna try an older version

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline gouessej

« In padded room »



TUER


« Reply #11 - Posted 2010-10-06 12:44:56 »

P.S. maybe is the latest version broken? i'm gonna try an older version
Maybe some of your environment variables point to "old" binaries and/or "old" JARs. For example, you can obtain such UnsatisfiedLinkError if Java use the wrong gluegen-rt native library (JOGL 1.1.1a instead of JOGL 2).

Offline deepthought
« Reply #12 - Posted 2010-10-06 14:19:04 »

i made sure they point to the new JARS. What DLL is this getPointerSizeInBitsImpl() method in anyways?

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline gouessej

« In padded room »



TUER


« Reply #13 - Posted 2010-10-08 12:35:48 »

i made sure they point to the new JARS. What DLL is this getPointerSizeInBitsImpl() method in anyways?
I assume it is in gluegen-rt.DLL

Offline deepthought
« Reply #14 - Posted 2010-10-08 14:24:13 »

funny because the new gluegen-rt is the exact same size as the old one. also, where's JOGL_cg.dll?

Ok now let's try setting this up from the beginning.

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline gouessej

« In padded room »



TUER


« Reply #15 - Posted 2010-10-08 16:55:46 »

where's JOGL_cg.dll?
Huh It does not exist anymore in JOGL 2 as far as I know.

Offline deepthought
« Reply #16 - Posted 2010-10-09 01:23:48 »

OK here is what i am doing. Created projects JARS_JOGL  and natives_JOGL . extracted the latest JOGL zip for windows, and copied JARS into the root directory of my JARS project and native libs to the natives project. i created a project for the program itself. i added all of the JARS from the project to the build path. under the source tab, i edited the native library location to the native lib project. i pasted the code from the SimpleScene demo into the editor and ran it. and i get the exception. i've got a feeling that this Platform.getPointerSizeInBitsImpl() method is completely missing from JOGL.

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline gouessej

« In padded room »



TUER


« Reply #17 - Posted 2010-10-09 17:39:47 »

OK here is what i am doing. Created projects JARS_JOGL  and natives_JOGL . extracted the latest JOGL zip for windows, and copied JARS into the root directory of my JARS project and native libs to the natives project. i created a project for the program itself. i added all of the JARS from the project to the build path. under the source tab, i edited the native library location to the native lib project. i pasted the code from the SimpleScene demo into the editor and ran it. and i get the exception. i've got a feeling that this Platform.getPointerSizeInBitsImpl() method is completely missing from JOGL.
If the method was missing, everybody would reproduce your bug. Maybe look at my own integration of JOGL 1.1.1a in my Eclipse project, it is going to work similarly when I switch completely to JOGL 2:
http://tuer.svn.sourceforge.net/viewvc/tuer/pre_beta/
I have a single Eclipse project that I can build even in command-line with Ant. I only use Ant to avoid your problems.

Offline deepthought
« Reply #18 - Posted 2010-10-11 20:40:05 »

how does this ant setup work? i've used the above procedure with JOGL 1.whatever and jinput and it worked fine.

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline deepthought
« Reply #19 - Posted 2010-10-14 14:07:57 »

did my thread just die?

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline gouessej

« In padded room »



TUER


« Reply #20 - Posted 2010-10-15 01:03:34 »

did my thread just die?
No. Currently I use my own build. Ask Sven to make another autobuild if you're sure your error comes from JOGL 2.0 beta. I'm sure it comes from your environment, maybe another version of gluegen is somewhere, for example if you installed JOAL.

Offline deepthought
« Reply #21 - Posted 2010-10-15 14:21:18 »

i just downloaded form the webstart and put the jars and native libs in thier own folder in my project. there is nothing in the JRE, but it still throws the exception.

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Offline gouessej

« In padded room »



TUER


« Reply #22 - Posted 2010-10-16 01:05:16 »

i just downloaded form the webstart and put the jars and native libs in thier own folder in my project. there is nothing in the JRE, but it still throws the exception.
The JARs from Web Start are completely outdated too (April 2010), they are going to be updated soon. Make your own build if you need fresh JARs immediately.

Offline deepthought
« Reply #23 - Posted 2010-10-20 14:11:23 »

OK..... this isn't wierd at all.......... something just worked for some odd reason, almost as if something told the JRE this method is
HERE,DERP! it works now for some odd reason. instaling normal JOGL was like this too.

jocks rule the highschools. GEEKS RULE THE WORLD MWAHAHAHA!!
captain failure test game
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (56 views)
2014-04-15 18:08:23

BurntPizza (54 views)
2014-04-15 03:46:01

UprightPath (67 views)
2014-04-14 17:39:50

UprightPath (50 views)
2014-04-14 17:35:47

Porlus (67 views)
2014-04-14 15:48:38

tom_mai78101 (91 views)
2014-04-10 04:04:31

BurntPizza (152 views)
2014-04-08 23:06:04

tom_mai78101 (248 views)
2014-04-05 13:34:39

trollwarrior1 (205 views)
2014-04-04 12:06:45

CJLetsGame (212 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!