Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (404)
games submitted by our members
Games in WIP (289)
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  
  Would it be possible to port LWJGL to other languages?  (Read 2240 times)
0 Members and 1 Guest are viewing this topic.
Online Sickan

Senior Member


Medals: 6



« Posted 2012-09-05 20:17:07 »

Hello. I've recently became interested in perhaps using other, interpreted languages to write games in. I wonder, would it be possible to generate bindings for other programming languages? Thank you for your time.

Cheers Smiley

I'm just here to learn.
Offline delt0r

JGO Coder


Medals: 18


Computers can do that?


« Reply #1 - Posted 2012-09-05 20:31:56 »

lwjgl is a binding of the C libs opengl, openal and input (or whatever its called) in java... You wouldn't make a binding to the java. Most langs do have some bindings at least for some of these libs.

I have no special talents. I am only passionately curious.--Albert Einstein
Offline sproingie
« Reply #2 - Posted 2012-09-05 20:34:43 »

If the other language is a JVM language such as Clojure or Scala, you can simply use LWJGL as-is, but you may want to check for more idiomatic libraries wrapping LWJGL first.  Otherwise, just google for "<language name> opengl binding" and you're likely to find one for almost any language.  Hell there's even opengl bindings for COBOL.
Games published by our own members! Check 'em out!
Play the free demo of Revenge of the Titans!
Online Sickan

Senior Member


Medals: 6



« Reply #3 - Posted 2012-09-05 20:40:07 »

If the other language is a JVM language such as Clojure or Scala, you can simply use LWJGL as-is, but you may want to check for more idiomatic libraries wrapping LWJGL first.  Otherwise, just google for "<language name> opengl binding" and you're likely to find one for almost any language.  Hell there's even opengl bindings for COBOL.
Although there are OpenGL bindings, I like the awesomeness of the LWJGL API and the OpenAL and OpenCL that comes with it. How much of LWJGL is Java-only?

I'm just here to learn.
Offline delt0r

JGO Coder


Medals: 18


Computers can do that?


« Reply #4 - Posted 2012-09-05 20:42:30 »

Almost none of it.

Really its pretty close to the C. Sure the devs will tell you there is a bit of footwork in the background to keep performance up etc. But C opengl and java lwjgl gl look the same with static imports. I have even cut and past examples from NeHe with very little changes required.


I have no special talents. I am only passionately curious.--Albert Einstein
Offline sproingie
« Reply #5 - Posted 2012-09-05 20:45:44 »

The "awesomeness" of the LWJGL API is pretty much the OpenGL API (and you're in a small minority if you think the C API is actually elegant).  LWJGL is as close to an exact clone of it as you can possibly get, and the only things on top that could be called "higher level" would be utilities like the vector math libraries, which have equivalents in most other languages.  As for OpenAL and OpenCL, you may have to look for separate bindings for those.

I recommend just trying out some other language's opengl library, such as python+pyglet.

... dammit delt0r y u always gotta ninja me? Wink
Online Sickan

Senior Member


Medals: 6



« Reply #6 - Posted 2012-09-05 21:00:06 »

But I don't want to change and I like the way LWJGL town is run Sad

I'm just here to learn.
Offline sproingie
« Reply #7 - Posted 2012-09-05 21:01:58 »

Then use LWJGL.  Seriously, what do you think the 'J' stands for?
Offline davedes
« Reply #8 - Posted 2012-09-05 21:12:00 »

I too prefer LWJGL to other bindings that I've used so far. It has lots of useful additions like the "glGenTextures()" overload and the ContextCapabilities class. Display is also super easy to set up compared to many other bindings.

You might want to look into Scala, Kotlin, Fantom and Groovy++. They are all "functional" languages that should yield higher performance than something like BeanShell, Jython, Rhino, etc.

Online Sickan

Senior Member


Medals: 6



« Reply #9 - Posted 2012-09-05 21:21:03 »

I too prefer LWJGL to other bindings that I've used so far. It has lots of useful additions like the "glGenTextures()" overload and the ContextCapabilities class. Display is also super easy to set up compared to many other bindings.

You might want to look into Scala, Kotlin, Fantom and Groovy++. They are all "functional" languages that should yield higher performance than something like BeanShell, Jython, Rhino, etc.
I've been taking quick paranoid glances at functional programming a while here and there, so I'll look into it.

Then use LWJGL.  Seriously, what do you think the 'J' stands for?
I'm sorry. I was not asking you or anybody else to do it, I was asking if it would be possible or preferable over starting anew entirely.

I'm just here to learn.
Games published by our own members! Check 'em out!
Try the Free Demo of Titan Attacks
Offline matheus23

JGO Wizard


Medals: 71
Projects: 3


You think about my Avatar right now!


« Reply #10 - Posted 2012-09-05 23:20:42 »

Really. As already pretty often said here. There are lots of OpenGL bindings with sometimes very powerful (almost as powerful as awt) window libs out there. For python there is pygame, for C/C++ you use native OpenGL with SDL (not pretty... but that's because of C persecutioncomplex ) and the awesome lib I've forgotten about... (Also: Qt, holy shit... it looks like it's even got ported to windows)

Take a look at my development Blog: http://matheusdev.tumblr.com
Also look at my RPG Ruins of Revenge
Offline ReBirth
« Reply #11 - Posted 2012-09-06 04:58:54 »

Hell there's even opengl bindings for COBOL.
No love for Pascal or Brainfukc? persecutioncomplex

Offline sproingie
« Reply #12 - Posted 2012-09-06 05:01:23 »

Bunches of pascal bindings out there like these and these.  None for brainf**k or befunge or unlambda tho ... but hey there are interpreters for those in languages that do have bindings.
Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


I'm the King!


« Reply #13 - Posted 2012-09-06 23:47:05 »

Why is brainfuck not getting any love? Tongue

Offline ReBirth
« Reply #14 - Posted 2012-09-07 04:15:18 »

Because it f**ks your brain.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (32 views)
2013-05-17 21:29:12

alaslipknot (40 views)
2013-05-16 21:24:48

gouessej (70 views)
2013-05-16 00:53:38

gouessej (69 views)
2013-05-16 00:17:58

theagentd (78 views)
2013-05-15 15:01:13

theagentd (73 views)
2013-05-15 15:00:54

StreetDoggy (113 views)
2013-05-14 15:56:26

kutucuk (137 views)
2013-05-12 17:10:36

kutucuk (137 views)
2013-05-12 15:36:09

UnluckyDevil (145 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.103 seconds with 21 queries.