Using Javascript to write OpenGL apps

Tom, March 23 2008
This quick test shows that using Rhino it is possible to call LWJGL functions from Javascript programs. It might be useful for quickly testing OpenGL snippets or writing cool tiny games.


John Carmack would be proud.

Nowadays it's possible to glue almost any two languages together and use one to control the other or use it's libraries. When investigating the TinyCC compiler I wrote about last time, I was amazed to find a Python module that uses TinyCC to compile and run C code on multiple platforms. That means that it's not only possible to script C programs using Python (with Boost::Python or whatever) but also to script Python programs using C!

You can try the Rhino example yourself - get this 3MB package with source code and all dependencies. Don't forget to add -Djava.library.path=lwjgl-1.1.4/native/win32 to the VM arguments - or import this Eclipse launch configuration which will do that for you.
No HTML

Your comment

No HTML allowed. Strings that start with http:// will turn into clickable links automatically.

Spam protection. How much is two by three?

Name: Email:
Games
Devastro
Titan Attacks
Chocolate Castle
Shop
Buy Devastro
Buy more games
Newsletter
Subscribe
Unsubscribe
Blog
Latest posts
Browse all posts
Subscribe to feed
Contact
Contact us
Feedback form
Game name generator