Differences between revisions 2 and 3
Revision 2 as of 2007-01-09 00:22:08
Size: 289
Editor: 12-214-79-52
Comment:
Revision 3 as of 2007-01-09 05:16:51
Size: 2018
Editor: 12-214-79-52
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
My everyday job consists of Java and/or PL/SQL programming and database development. That is why I thought it would be fun to start looking into Java and Jython game development. I've chosen to implement a Jython program which utilizes the Java Binding for OpenGL (JOGL) API. This brief article is not meant to be a tutorial for using JOGL API as there are many good references already available (see below), but rather it is meant to be a "proof-of-concept" that Jython does work with JOGL ''for the most part''.

I say ''for the most part'' because I was unable to make the program work exactly as desired. What I did was translate a great tutorial JOGL demo application which was written by [http://folk.ntnu.no/johanno/joomla/content/view/15/45/ Johannes Odland] into Jython. I will tell you how I set up my environment, which IDE I used, and then I will give you my '''''imperfect''''' Jython source. I emphasize imperfect as I know that the code could have been written better as well as commented...but I simply ran out of time and wanted to share the code in this distribution.
Line 10: Line 13:
In order to utilize the JOGL API, you will need to download a version from the [https://jogl.dev.java.net/ JOGL Homepage] and install it into your JDK. I am using a Windows XP Professional OS, and downloaded the jogl-1.1.0-rc1-windows-i586 version of JOGL.

If you are using Windows XP, you can simply place the dll files into your JDK\JRE\lib\bin folder. You then place the JOGL jar files in your project classpath. For my demo, I used JDK 6.0 and it worked well.
Line 13: Line 19:
I recommend the [http://pydev.sourceforge.net/ PyDev] environment for Eclipse in this case. Simply because it offers code completion and easy project setup.
Line 15: Line 22:

Proof of Concept: Using Jython with the JOGL API

Submitted By: Josh Juneau

Introduction

My everyday job consists of Java and/or PL/SQL programming and database development. That is why I thought it would be fun to start looking into Java and Jython game development. I've chosen to implement a Jython program which utilizes the Java Binding for OpenGL (JOGL) API. This brief article is not meant to be a tutorial for using JOGL API as there are many good references already available (see below), but rather it is meant to be a "proof-of-concept" that Jython does work with JOGL for the most part.

I say for the most part because I was unable to make the program work exactly as desired. What I did was translate a great tutorial JOGL demo application which was written by [http://folk.ntnu.no/johanno/joomla/content/view/15/45/ Johannes Odland] into Jython. I will tell you how I set up my environment, which IDE I used, and then I will give you my imperfect Jython source. I emphasize imperfect as I know that the code could have been written better as well as commented...but I simply ran out of time and wanted to share the code in this distribution.

Setting Up The Environment

In order to utilize the JOGL API, you will need to download a version from the [https://jogl.dev.java.net/ JOGL Homepage] and install it into your JDK. I am using a Windows XP Professional OS, and downloaded the jogl-1.1.0-rc1-windows-i586 version of JOGL.

If you are using Windows XP, you can simply place the dll files into your JDK\JRE\lib\bin folder. You then place the JOGL jar files in your project classpath. For my demo, I used JDK 6.0 and it worked well.

IDE Recommendation

I recommend the [http://pydev.sourceforge.net/ PyDev] environment for Eclipse in this case. Simply because it offers code completion and easy project setup.

Example Code

Conclusion

Resources

[https://jogl.dev.java.net/ JOGL Project]

JythonMonthly/Articles/January2007/2 (last edited 2008-11-15 09:15:57 by localhost)