Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (546)
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 3136 times)
0 Members and 1 Guest are viewing this topic.
Offline Sickan

Senior Member


Medals: 9



« Posted 2012-09-05 18: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
Offline delt0r

JGO Knight


Medals: 27
Exp: 18 years


Computers can do that?


« Reply #1 - Posted 2012-09-05 18: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

JGO Kernel


Medals: 202



« Reply #2 - Posted 2012-09-05 18: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!
Legends of Yore - The Casual Retro Roguelike
Offline Sickan

Senior Member


Medals: 9



« Reply #3 - Posted 2012-09-05 18: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?
Offline delt0r

JGO Knight


Medals: 27
Exp: 18 years


Computers can do that?


« Reply #4 - Posted 2012-09-05 18: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

JGO Kernel


Medals: 202



« Reply #5 - Posted 2012-09-05 18: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
Offline Sickan

Senior Member


Medals: 9



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

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

JGO Kernel


Medals: 202



« Reply #7 - Posted 2012-09-05 19:01:58 »

Then use LWJGL.  Seriously, what do you think the 'J' stands for?
Offline davedes
« Reply #8 - Posted 2012-09-05 19: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.

Offline Sickan

Senior Member


Medals: 9



« Reply #9 - Posted 2012-09-05 19: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.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #10 - Posted 2012-09-05 21: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)

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline ReBirth
« Reply #11 - Posted 2012-09-06 02:58:54 »

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

Offline sproingie

JGO Kernel


Medals: 202



« Reply #12 - Posted 2012-09-06 03: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: 345
Projects: 2
Exp: 5 years


I'm the King!


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

Why is brainfuck not getting any love? Tongue

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

Because it f**ks your brain.

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

 

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

The first screenshot will be displayed as a thumbnail.

atombrot (20 views)
2014-08-19 09:29:53

Tekkerue (21 views)
2014-08-16 06:45:27

Tekkerue (21 views)
2014-08-16 06:22:17

Tekkerue (12 views)
2014-08-16 06:20:21

Tekkerue (19 views)
2014-08-16 06:12:11

Rayexar (55 views)
2014-08-11 02:49:23

BurntPizza (37 views)
2014-08-09 21:09:32

BurntPizza (27 views)
2014-08-08 02:01:56

Norakomi (35 views)
2014-08-06 19:49:38

BurntPizza (64 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!