cylab
|
 |
«
Posted
2006-02-18 18:31:27 » |
|
I have just finished a first version of a JOGL project template as extension module. Momentarily it is only functional on Windows
You can download it here: http://cylab.codewut.de/nbms/50/net-highteq-gamedev-nbm-joglproject.nbm
or you could also add an Autoupdate-Center for my modules, since there is more to come (GLSL-Editor, more Demos, etc.) http://cylab.codewut.de/nbms/50.xml
Tools->Options->[AdvancedOptions] (+)IDE Configuration (+)System (+)Autoupdate Types
Add a new "General Update Center" via right click context menu and change the Server URL on the new entry to the above
Any comments are welcome!
Edit: This project was replaced by it's successor, the Netbeans OpenGL Pack. See some screenshots hereHave fun!
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
turquoise3232
Junior Devvie  
Java (games) rock!
|
 |
«
Reply #1 - Posted
2006-02-20 09:43:56 » |
|
Hi,
I'm quite afraid, not for security but for update issues, to install a plug-in with a specific version of jogl. But it's sure that this kind of plug-in could really improve the easiness of starting a new project with jogl.
Good job!
|
|
|
|
cylab
|
 |
«
Reply #2 - Posted
2006-02-20 10:52:48 » |
|
Thanks for comment. I plan to keep the plugin up to date with the current JOGL releases. The JOGL jars/natives are not part of the project template. They are copied from the module installation location to your apps distibution binaries during the build process. So JOGL projects based on this template will get updated automatically whith each plugin update. Maybe there should be an option to disable this behaviour and create a project tree that contain all libraries and natives, so that developer can keep and update specific JOGL versions, if they want/need to. I'm quite afraid, not for security but for update issues, to install a plug-in with a specific version of jogl.
I forget to mention, that the plugin does NOT install anything anywhere inside your JRE/JDK or PATH environment. You are absolutely save to install this module without breaking your system's setup.
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
Games published by our own members! Check 'em out!
|
|
Aaron_Anderson
Senior Newbie 
perception is reality
|
 |
«
Reply #3 - Posted
2006-02-20 17:41:20 » |
|
This isn't really related but I asked the JSR 198 expert group about loading native libraries and managing native dependencies with JSR 198, the Java IDE standard because I someday may want to use JOGL in a plugin. Here is the response I got: As I said in my previous reply to your question the JSR does not provide a standard way to to define dependencies to native libraries.
What the JSR provides is an API clients can call to get their extension path: ExtensionRegistry.getInstallRoot(). This API can be used to get at the directory where your native library resides as follows:
import javax.ide.extension.ExtensionRegistry; import javax.ide.net.URIFactory; import javax.ide.net.VirtualFileSystem;
...
final Extension myExt = ExtensionRegistry.getExtension("my.extension"); final URI extPath = ExtensionRegistry.getInstallRoot(myExt);
final URI libPath = URIFactory.newURI(extPath, "lib");
final String path = URIVirtualFileSystem.getPlatformPathName(libPath);
Now you can use the System.loadLibrary( path ) method call to load your native library.
You also must take care to package your extension into a JSR 198 extension bundle archive (EBA), and to place your files as specified by the EBA specification:
- my.extension.jar => extension jar - my.extension => extension directory must have same name as extension jar. - my.extension\lib\my.dll => native library
The EBA is installed in an IDE's extensions directory.
I hope this answers your question.
Jose. I am not too familar with the latest open IDE API but if it support file paths for modules then the above approach my work for managing JOGL version dependencies
|
|
|
|
cylab
|
 |
«
Reply #4 - Posted
2006-02-20 18:46:21 » |
|
The project template described above is to develop a standalone java application and not to develop a netbeans plugin. It's only that the template can be deployed using the netbeans module mechanism.
I have however written a library module for use in netbeans plugins as well. It was quite easy, since there is a special purpose folder in a module that gets added to the java.library.path automatically. I will upload this to my update-center soon.
Nevertheless your quote is an insightful contribution, since I was not aware of the JSR 198.
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
cylab
|
 |
«
Reply #5 - Posted
2006-02-20 22:12:16 » |
|
Theres an update available: * Updated jogl libraries to JSR-231 beta3 * Added support for all JOGL platforms via "Build Project" (untested) * Added 2 more demos from the jogl sources (Vertex Program Refraction and Procedural Texture Physics) * Splitted module in joglproject and jogldemosproject to reduce download time for the base project ( http://cylab.codewut.de/nbms/50/net-highteq-gamedev-nbm-joglproject.nbm) ( http://cylab.codewut.de/nbms/50/net-highteq-gamedev-nbm-jogldemosproject.nbm) Please have a look and report success or problems on other platforms than windows => Thanks!NOTE: Projects created with the previous version do not work after this update. I recommend creating a new project and copying the contents of your "src" folder to it.
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
bernie
Senior Newbie 
|
 |
«
Reply #6 - Posted
2006-02-20 23:54:46 » |
|
hi there..thanks so much for the info!! I did what you suggested, and downloaded netbeans and set an auto config to your URL...yay! so, now, can you please tell me more about properly using it.. is there JOGL documentation available?
bernie
|
|
|
|
cylab
|
 |
«
Reply #7 - Posted
2006-02-21 00:08:27 » |
|
JOGL is more or less the same than C/C++ OpenGL, so there is no special documentation available. See http://nehe.gamedev.net/ for general OpenGL tutorials. Most of them contain a JOGL or GL4Java (some kind of JOGL predecessor) port. There are some more recent ports of the lessons at http://pepijn.fab4.be/nehe/ like Ken already pointed out at the other Thread. I would however suggest to follow the instructions and try to recode the interesting lessons there by yourself to get a feeling for JOGL. At first just try to copy and paste your C++ code and add a "gl." before each OpenGL-Call. The IDE will shriek if somethings not right ;-)
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
bernie
Senior Newbie 
|
 |
«
Reply #8 - Posted
2006-02-21 00:18:48 » |
|
thanks so much
|
|
|
|
rodgersgb
Senior Newbie 
|
 |
«
Reply #9 - Posted
2006-02-21 17:34:31 » |
|
I am new to NetBeans and would like to utilize your template for JOGL. Could you please explain how to use your template.
Thanks.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
cylab
|
 |
«
Reply #10 - Posted
2006-02-21 18:40:01 » |
|
To Install the plugin - Follow the instructions in the first post to register a new update center - Go to "Tools"->"Update Center" - Make sure the checkbox of the newly created update center is selected - Select "OpenGL / JOGL OpenGL project" and optionally "OpenGL / JOLG OpenGL demo project" and click [ Add > ] - Click [ Next > ] and accept the licence agreements - Click [ Next > ] once the download is finished - Include the downloaded modules in the install by checking the checkboxes at the left - Click [ Yes ] at the "Untrusted Modules" warning (I haven't signed the modules yet...) - Click [ Finish ] and allow the IDE to restart
After the restart you can create a new JOGL-Project doing the following: - Choose "File"->"New Project" - Select Category "OpenGL" and Project: "Simple JOGL Appplication" - Click [ Next > ], change the desired fields in the next form and click [ Finish ]
Now your Project is set and you can click the "Play"-Button in the Toolbar and see what happens.
After the first run examine the generated .java file under the "Source Packages" folder, change something and hit "Play" again.
You can generate distributions of your application for all JOGL supported platforms by clicking the "Build Main Project" button (the blue one with the wrench symbol). You can examine the results by changing to the "Files" view.
Happy coding
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
rodgersgb
Senior Newbie 
|
 |
«
Reply #11 - Posted
2006-02-21 18:49:35 » |
|
Thanks, that comile fine, but I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
I assume this has to do with the win32 dlls fo JOGL? Any suggestions?
|
|
|
|
cylab
|
 |
«
Reply #12 - Posted
2006-02-21 18:58:16 » |
|
You shouldn't get that error, since the dlls are included. Could you please create a new project and post the content of the output console just after clicking [ Finish > ]
Also post the output console content after compile. Thanks
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
rodgersgb
Senior Newbie 
|
 |
«
Reply #13 - Posted
2006-02-21 19:08:55 » |
|
"Could you please create a new project and post the content of the output console just after clicking [ Finish > ]"
initProject: Created dir: C:\Documents and Settings\rodgersgb\Test2Opengl\tmp Expanding: C:\Program Files\netbeans-5.0\nb5.0\jogl-project\jogl-templates.zip into C:\Documents and Settings\rodgersgb\Test2Opengl\tmp Created dir: C:\Documents and Settings\rodgersgb\Test2Opengl\src\org\yourorghere Moving 1 file to C:\Documents and Settings\rodgersgb\Test2Opengl\src\org\yourorghere Moving 1 file to C:\Documents and Settings\rodgersgb\Test2Opengl\src\org\yourorghere Deleting directory C:\Documents and Settings\rodgersgb\Test2Opengl\tmp addDeps: BUILD SUCCESSFUL (total time: 0 seconds)
"Also post the output console content after compile. Thanks"
init: deps-jar: Created dir: C:\Documents and Settings\rodgersgb\Test2Opengl\build\classes Compiling 1 source file to C:\Documents and Settings\rodgersgb\Test2Opengl\build\classes compile: Created dir: C:\Documents and Settings\rodgersgb\Test2Opengl\dist Building jar: C:\Documents and Settings\rodgersgb\Test2Opengl\dist\Test2Opengl.jar To run this application from the command line without Ant, try: java -jar "C:\Documents and Settings\rodgersgb\Test2Opengl\dist\Test2Opengl.jar" Creating native distibutions Created dir: C:\Documents and Settings\rodgersgb\Test2Opengl\dist-linux C:\Documents and Settings\rodgersgb\Test2Opengl\build.xml:75: C:\WINDOWS\system32\jogl-natives-linux not found. BUILD FAILED (total time: 0 seconds)
I see that its assuming linux. Also, I downloaded the JOGL libs (I am using windows). Do the dlls need to be put in the system32 dir?
Thanks.
|
|
|
|
cylab
|
 |
«
Reply #14 - Posted
2006-02-21 19:15:57 » |
|
No, you don't need any additional libs beside the module. Just delete the created projects, create a new one and select "Windows" as platform in the projects creation dialog.
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
rodgersgb
Senior Newbie 
|
 |
«
Reply #15 - Posted
2006-02-21 19:22:10 » |
|
It did have "Windows" selected as the Platform. I just tried it again with "Windows" chosen as the platform. Same results.
For some reason it is assuming linux.
|
|
|
|
cylab
|
 |
«
Reply #16 - Posted
2006-02-21 19:27:20 » |
|
After rereading your post, I am afraid, recreating the project will not help. Could you please zip a newly created project and send it to cylab<at>highteq<dot>net (<at> and <dot> replaced respectively)
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
eteq12
Junior Newbie
|
 |
«
Reply #17 - Posted
2006-05-22 06:38:00 » |
|
Is this server still up? I can't get it to show any packages in NetBeans, and if I try using the browser, I get a 502 error...
|
|
|
|
cylab
|
 |
«
Reply #18 - Posted
2006-05-22 08:11:15 » |
|
Sorry. My tomcat crashed :-/ Thanks for pointing out. It's up again. I will release an update this weekend including jogl-jsr-beta4, some more examples and a simple glsl syntax colorizing editor.
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
sprite3D
Junior Newbie
|
 |
«
Reply #19 - Posted
2006-05-30 03:14:22 » |
|
hi, Thank you very much. I have searched for a long time to use nb to develop the jogl. you give me a big help !
|
|
|
|
cylab
|
 |
«
Reply #20 - Posted
2006-06-13 12:13:32 » |
|
Theres an update available: * Updated jogl libraries to JSR-231 beta5 * Added support for additional target platforms * Added the Particle Engine Demo * Added simple syntax highlighting GLSL shader editor. You can download the available modules here: http://cylab.codewut.de/nbms/50/net-highteq-gamedev-nbm-joglproject.nbm http://cylab.codewut.de/nbms/50/net-highteq-gamedev-nbm-jogldemosproject.nbm http://cylab.codewut.de/nbms/50/com-thoughtworks-xstream.nbm (needed for the GLSL editor) http://cylab.codewut.de/nbms/50/net-highteq-gamedev-nbm-glsleditor.nbmOr setup an Update-Center: Tools->Options->[AdvancedOptions] (+)IDE Configuration (+)System (+)Autoupdate Types Add a new "General Update Center" via right click context menu, name it and change the Server URL on the new entry to http://cylab.codewut.de/nbms/50.xml. After that you can install the modules via Tools->Update Center. Please have a look and report success or problems on other platforms than windows => Thanks!=============================================================NOTE: Projects created with the previous version do not work after this update.I recommend creating a new project and copying the contents of your "src" folder to it. Alternatively you can fix your project by...- ...changing the jogl.natives entry around line 40 in nbproject/project.properties to a full qualified native name. Available natives: 1 2 3 4 5 6 7 8
| jogl-natives-linux-i586 jogl-natives-linux-amd64 jogl-natives-macosx-ppc jogl-natives-macosx-universal jogl-natives-solaris-sparc jogl-natives-solaris-sparcv9 jogl-natives-solaris-i586 jogl-natives-windows-i586 |
- ...and exchanging the -post-jar target in your build.xml by the following: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| <target name="-post-jar"> <echo message="Creating native distibutions"/> <dirname property="jogl.libs" file="${libs.JOGL.classpath}"/>
<mkdir dir="${dist.dir}-linux-i586"/> <copy todir="${dist.dir}-linux-i586"> <fileset dir="${dist.dir}" defaultexcludes="no"/> <fileset dir="${jogl.libs}/jogl-natives-linux-i586"/> </copy >
<mkdir dir="${dist.dir}-linux-amd64"/> <copy todir="${dist.dir}-linux-amd64"> <fileset dir="${dist.dir}" defaultexcludes="no"/> <fileset dir="${jogl.libs}/jogl-natives-linux-amd64"/> </copy >
<mkdir dir="${dist.dir}-macosx-ppc"/> <copy todir="${dist.dir}-macosx-ppc"> <fileset dir="${dist.dir}" defaultexcludes="no"/> <fileset dir="${jogl.libs}/jogl-natives-macosx-ppc"/> </copy >
<mkdir dir="${dist.dir}-macosx-universal"/> <copy todir="${dist.dir}-macosx-universal"> <fileset dir="${dist.dir}" defaultexcludes="no"/> <fileset dir="${jogl.libs}/jogl-natives-macosx-universal"/> </copy >
<mkdir dir="${dist.dir}-solaris-sparc"/> <copy todir="${dist.dir}-solaris-sparc"> <fileset dir="${dist.dir}" defaultexcludes="no"/> <fileset dir="${jogl.libs}/jogl-natives-solaris-sparc"/> </copy >
<mkdir dir="${dist.dir}-solaris-sparcv9"/> <copy todir="${dist.dir}-solaris-sparcv9"> <fileset dir="${dist.dir}" defaultexcludes="no"/> <fileset dir="${jogl.libs}/jogl-natives-solaris-sparcv9"/> </copy >
<mkdir dir="${dist.dir}-solaris-i586"/> <copy todir="${dist.dir}-solaris-i586"> <fileset dir="${dist.dir}" defaultexcludes="no"/> <fileset dir="${jogl.libs}/jogl-natives-solaris-i586"/> </copy >
<mkdir dir="${dist.dir}-windows-i586"/> <copy todir="${dist.dir}-windows-i586"> <fileset dir="${dist.dir}" defaultexcludes="no"/> <fileset dir="${jogl.libs}/jogl-natives-windows-i586"/> </copy >
<copy todir="${dist.dir}"> <fileset dir="${jogl.libs}/${jogl.natives}" defaultexcludes="yes"/> </copy > </target> |
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
ajaskey
Junior Newbie
|
 |
«
Reply #21 - Posted
2006-11-08 16:37:41 » |
|
Has this link moved? It worked a couple weeks ago but I have not been able to get there in the past couple days.
Thanx. Andy
|
|
|
|
cylab
|
 |
«
Reply #22 - Posted
2006-11-09 09:19:00 » |
|
We are currently moving to a new server and hosting provider and I am upgrading to the final JSR. Please take a look next weekend.
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
ajaskey
Junior Newbie
|
 |
«
Reply #23 - Posted
2006-11-09 21:31:01 » |
|
We are currently moving to a new server and hosting provider and I am upgrading to the final JSR. Please take a look next weekend.
Thanx for the template and the update. It helps a lot. Andy
|
|
|
|
billrobertson42_
Junior Newbie
|
 |
«
Reply #24 - Posted
2006-11-18 20:48:25 » |
|
I have tried to download this several times with no success. The server does not respond. e.g. C:\Documents and Settings\bill>wget -d http://cylab.codewut.de/nbms/50.xmlDEBUG output created by Wget 1.10.2 on cygwin. --15:45:27-- http://cylab.codewut.de/nbms/50.xml => `50.xml' Resolving cylab.codewut.de... 80.190.244.218 Caching cylab.codewut.de => 80.190.244.218 Connecting to cylab.codewut.de|80.190.244.218|:80... connected. Created socket 3. Releasing 0x10041fb8 (new refcount 1). ---request begin--- GET /nbms/50.xml HTTP/1.0 User-Agent: Wget/1.10.2 Accept: */* Host: cylab.codewut.de Connection: Keep-Alive ---request end--- HTTP request sent, awaiting response...
|
|
|
|
cylab
|
 |
«
Reply #25 - Posted
2007-02-01 10:27:10 » |
|
Sorry all, I had no time to work on this earlier. The modules are online again and hosted on a new server, so I hope there will be less downtimes in future. Right now the modules are several month old and still use the latest jsr beta version. I'll try to update them as soon as possible. Updates will be available vie the update center and announced here. Projects based on this version should be compatible to the upcoming update.
Best Regards Mathias
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
|
zero
|
 |
«
Reply #27 - Posted
2007-03-03 15:00:28 » |
|
just added the gamecenter to my updates and installed the glsl editor (only this component), which seem to work fine. Syntax Highlighting or not realy makes a difference.. :-)
thanks for providing this!
|
|
|
|
cylab
|
 |
«
Reply #28 - Posted
2007-03-05 08:12:49 » |
|
Thanks for your Feedback 
|
Mathias - I Know What [you] Did Last Summer!
|
|
|
Mange
Junior Newbie
|
 |
«
Reply #29 - Posted
2007-03-10 12:05:54 » |
|
Cylab: Perhaps you should update the first post as well? I got into this forum looking for a quick way to get JOGL to work, so I used your old update-site from the first post and ran into problems with the glugen.rt path not being specified etc. I'm gonna try with the new update site now. Natrually not everyone is as ignorant as me and reads on instead, but some dummies are bound to start bugging you because it's not working.
If it works I'm very grateful since I was looking for a quick way to get it to work and get my hands dirty. A lot of tutorials I found used the net.java.gaming package. Hard for a newbie to understand what was wrong (I installed the latest rc).
Edit: My bad, they were the same. When I try to build your test project I get this error (stack trace):
Exception in thread "main" java.lang.UnsatisfiedLinkError: no gluegen-rt in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at com.sun.gluegen.runtime.NativeLibLoader$1.run(NativeLibLoader.java:68) at java.security.AccessController.doPrivileged(Native Method) at com.sun.gluegen.runtime.NativeLibLoader.loadGlueGenRT(NativeLibLoader.java:66) at com.sun.gluegen.runtime.NativeLibrary.ensureNativeLibLoaded(NativeLibrary.java:399) at com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:163) at com.sun.gluegen.runtime.NativeLibrary.open(NativeLibrary.java:129) at com.sun.opengl.impl.x11.DRIHack.begin(DRIHack.java:109) at com.sun.opengl.impl.x11.X11GLDrawableFactory.<clinit>(X11GLDrawableFactory.java:99) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:111) at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:113) at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:82) at javax.media.opengl.GLCanvas.<init>(GLCanvas.java:75) at org.yourorghere.SimpleJOGL2.main(SimpleJOGL2.java:22) Java Result: 1
I get the same in Eclipse so perhaps this don't have anything to do with your code. I just generated your project without any changes. If anyone knows how to help me I'd be very grateful!
Edit2: Tried running with this. No change. -Djava.library.path=/home/magnus/Filer/gluegen-rt.jar;/home/magnus/Filer/jogl.jar;/home/magnus/Filer/jogl-linux-natives-i586.jar
|
|
|
|
|