pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #60 - Posted
2003-09-16 23:15:10 » |
|
I've modified JavaCoolDudes code to look similar to my own code (hope you don't mind). Updated zip here.
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #61 - Posted
2003-09-17 05:35:11 » |
|
I liked how you mixed up my work and yours, big thumb up 
|
|
|
|
|
mockum
Junior Newbie
Java games rock!
|
 |
«
Reply #62 - Posted
2003-09-17 22:30:20 » |
|
Here's an Ant build.xml:
<?xml version="1.0"?>
<!-- Ant build file for the NeHe OpenGL/JOGL demos. --> <project name="nehe-demos" default="jar" basedir=".">
<property file="ant.properties"/>
<property name="build.dir" value="build"/> <property name="cache.dir" value="cache"/> <property name="dist.dir" value="lib"/> <property name="src.dir" value="src"/> <property name="jar" value="${dist.dir}/nehe-demos.jar"/> <property name="dist" value="${dist.dir}/nehe-demos.zip"/> <property name="jogljar" value="${dist.dir}/jogl.jar"/> <property name="debug" value="false"/>
<path id="project.class.path"> <pathelement path="${java.class.path}"/> <pathelement path="${jogljar}"/> </path>
<target name="init"> <tstamp/> </target>
<target name="prepare" depends="init"> <mkdir dir="${build.dir}"/> <mkdir dir="${dist.dir}"/> </target>
<target name="compile" depends="prepare"> <depend srcdir="${src.dir}" destdir="${build.dir}" cache="${cache.dir}" closure="yes"/> <javac srcdir="${src.dir}" destdir="${build.dir}" debug="${debug}"> <classpath refid="project.class.path"/> </javac> </target>
<target name="jar" depends="prepare,compile"> <jar jarfile="${jar}" basedir="${build.dir}"/> </target>
<target name="dist" depends="jar,clean"> <delete file="${dist}"/> <zip zipfile="${dist}" basedir="."/> </target>
<target name="clean" depends="init"> <delete dir="${build.dir}"/> <delete dir="${cache.dir}"/> </target>
<target name="clean-all" depends="clean"> <delete file="${jar}"/> <delete file="${dist}"/> </target> </project>
And a sample (and optional) ant.properties:
# Tell Ant which compiler to use. build.compiler=jikes
# Tell Ant and Jikes to output errors in a emacs-friendly format. build.compiler.emacs=yes
# Tell javac/jikes to include debugging information into the .class files. debug=on
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #63 - Posted
2003-09-18 07:13:52 » |
|
Thank you for the build script. I have added it to the zip file on my server.
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #64 - Posted
2003-09-19 19:11:38 » |
|
Would somebody contact Nehe about the work that we did so far? Seeing the current shape of the material, I think it's safe to expose it to a larger audiance through the mentioned website. Peace. PS: I'm too busy working on a little demo which will demonstrate the use of vertex shaders in volume shadows :p
|
|
|
|
|
Caoimhin
|
 |
«
Reply #65 - Posted
2003-09-19 22:51:33 » |
|
I've pointed Jeff Molofee (NeHe) to this thread awhile back. I think you guys only need to submit your ports to him. I know pepijnve has already sent a few ports to him.
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #66 - Posted
2003-09-21 13:21:19 » |
|
I've updated the zip on my server again. I've added the last two lessons I was going to port. zip file
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #67 - Posted
2003-09-21 18:02:00 » |
|
I've updated the zip on my server again. I've added the last two lessons I was going to port. zip fileWhat happened to lesson 30 and 24? 
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #68 - Posted
2003-09-21 19:01:47 » |
|
I haven't had time to integrate them yet. Patience my friend 
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #69 - Posted
2003-09-21 19:03:59 » |
|
I haven't had time to integrate them yet. Patience my friend  Roger that  /me back working a Quake3 model + animation loader for JOGL 
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #70 - Posted
2003-09-21 20:52:25 » |
|
I've added lessons 24 and 30 and updated the zip.
|
|
|
|
|
kaffiene
|
 |
«
Reply #71 - Posted
2003-09-21 23:13:04 » |
|
Is it possible to submit the nehe tutorials to the jogl/demos cvs repository?
That would provide one point of contact to get all the jogl tutorials (NeHe provides no way to browse only those tutorials that have Jogl ports AFAIK)
It would also allow all updates to be fetched in one go, and put the demos somewhere where visitors to games.dev.java.net are likely to find them.
|
|
|
|
|
Ken Russell
|
 |
«
Reply #72 - Posted
2003-09-21 23:18:27 » |
|
I've been hoping someone on this thread could assemble the demos into that tree and test the results to make sure they all build and run. Any takers?
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #73 - Posted
2003-09-21 23:31:54 » |
|
Ken, the demos I've put up on my site should integrate fine now with the other demos from jogl. All source is under a package demos.nehe. Also all the demos read their data file from a directory demos/data/(images|models|samples) and also support that these files are read from a jar. Is this sufficient? As you know I'm kind of stuck on signing the contributors agreement, so someone else will have to check them in.
|
|
|
|
|
Ken Russell
|
 |
«
Reply #74 - Posted
2003-09-21 23:47:12 » |
|
It sounds good. Ideally I would like a developer to sign up for maintaining these demos once checked in to the source tree.
Could you please file an RFE for integrating these sources into the jogl-demos tree? Thanks.
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #75 - Posted
2003-09-21 23:57:06 » |
|
Done
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #76 - Posted
2003-09-22 00:34:05 » |
|
I've added lessons 24 and 30 and updated the zip. You only included the .Bat files my friend 
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #77 - Posted
2003-09-22 07:54:22 » |
|
Serious? Hum, there goes my reputation  I'll fix this asap (being tonight).
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #78 - Posted
2003-09-22 19:05:18 » |
|
Stupid me. I uploaded the wrong zip file. That little mistake has been corrected now.
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #79 - Posted
2003-09-22 19:14:41 » |
|
Pepi: I'm working on a Quake3 loader and animator in JOGL, and I'm pretty advanced as I type in these lines. Question is, do you mind taking my code once done and shape it the way you did with my nehe's port? Like including the binaries etc... I also wanna use your bitmapLoader class as it's that || close to mine, but looks prettier to the eye 
|
|
|
|
|
Caoimhin
|
 |
«
Reply #80 - Posted
2003-09-22 22:24:31 » |
|
I've a silly question. Why are you guys using batch files? Why aren't you just making your jars executable?
I've never found someone else's batch file to be compatible with my runtime environment on Win32. And they're useless on other platforms.
Just curious...
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #81 - Posted
2003-09-22 22:29:24 » |
|
Good point. I simply hadn't thought of packaging them that way. I'll see if I can repackage the lessons quickly.
|
|
|
|
|
|
|
quintesse
Junior Member  
Java games rock!
|
 |
«
Reply #83 - Posted
2003-09-23 15:46:44 » |
|
I think the MANIFEST is wrong, it now says something like Main-Class: demos/nehe/lesson04/Lesson04 while I think it should be Main-Class: demos.nehe.lesson04.Lesson04 (I'm getting class not found errors while unpacking the jar and executing manually does work).
The other thing is that the jars all refer to Class-Path: data-lessonNN.jar, are these necessary? (although I don't think they're doinig any harm either)
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #84 - Posted
2003-09-23 16:06:57 » |
|
The class-path item is indeed wrong. That's what you get when doing late night updates  . I'm not sure about the main-class item though. The manifest spec says Main-Class : The value of this attribute defines the relative path of the main application class which the launcher will load at startup time. The value must not have the .class extension appended to the class name. I interpreted 'path' as meaning 'use slashes as separator'. I tested this on my Powerbook and it ran fine there. I didn't test on windows or linux though. I'll give the dot separator approach a try when I get home from work.
|
|
|
|
|
Caoimhin
|
 |
«
Reply #85 - Posted
2003-09-23 16:18:51 » |
|
You use the dot separator. For example:
Main-Class: com.myco.game.MyGame Class-Path: dependency.jar
dependency.jar would then have to be in the same directory as the executing jar or in the current classpath.
My guess is specifying the path with slashes worked because you had those classes in that directory structure on your drive. It read the drive rather than the contents of the jar.
|
|
|
|
|
quintesse
Junior Member  
Java games rock!
|
 |
«
Reply #86 - Posted
2003-09-23 17:40:08 » |
|
Maybe that's Java implementation dependent because doing "java some/path/to/a/Class" does not work on my Windows system (j2sdk 1.4.2) regardless if the directories exist or if it's a jar. Only "java some.path.to.a.Class" works.
|
|
|
|
|
Caoimhin
|
 |
«
Reply #87 - Posted
2003-09-23 18:29:46 » |
|
I've got some time now to work on the next tutorial, but I'm a big confused now.
Are we going with a common framework? If not, is pepijnve going to continue to port work to the framework for the jogl demos? Are we going to have to maintain two versions? One for nehe.gamedev.net and one for jogl-demos.java.net? Updating code between two sites is going to be a bear without CVS write access. And nehe updates his site by hand.
|
|
|
|
|
Caoimhin
|
 |
«
Reply #88 - Posted
2003-09-23 18:45:15 » |
|
Ouch, the GLDisplay class is not working on this machine for fullscreen. 1 2 3 4 5 6 7 8
| C:\Development\Projects\jogl\nehe-demos\src>java demos.nehe.lesson01.Lesson01 Exception in thread "main" java.lang.InternalError: Could not get display mode at sun.awt.Win32GraphicsDevice.getCurrentDisplayMode(Native Method) at sun.awt.Win32GraphicsDevice.getDisplayMode(Win32GraphicsDevice.java:330) at java.awt.GraphicsDevice.setFullScreenWindow(GraphicsDevice.java:195) at sun.awt.Win32GraphicsDevice.setFullScreenWindow(Win32GraphicsDevice.java:262) at demos.nehe.common.GLDisplay.start(GLDisplay.java:74) at demos.nehe.lesson01.Lesson01.main(Lesson01.java:9) |
|
|
|
|
|
Caoimhin
|
 |
«
Reply #89 - Posted
2003-09-23 18:49:48 » |
|
Maybe that's Java implementation dependent because doing "java some/path/to/a/Class" does not work on my Windows system (j2sdk 1.4.2) regardless if the directories exist or if it's a jar. Only "java some.path.to.a.Class" works. I'm running Sun's JRE and JDK. C:\>java -version java version "1.4.1_03" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_03-b02) Java HotSpot(TM) Client VM (build 1.4.1_03-b02, mixed mode) Either slashes or dots work fine for me as long as I'm executing from the top of the package tree. I also run without a CLASSPATH if I can avoid it.
|
|
|
|
|
|