What exactly does LibGdx compile to natively?

For example, with ios, I have searched, found this,

http://www.java-gaming.org/index.php?topic=32574.0

Nothing more recent or informative.

From what I could barely understand, Libgdx looked like it compiled to lots of different platforms, including ios. Then I read posts about RoboVM vs Libgdx, and finally Libgdx with RoboVM on the backend (or vice versa, I don’t remember.)

If I’d like to play my game on ios, which do I use? Finally, I read on Libgdx they deprecated one library, and now they use RoboVM. I’m probably answer my own question, but when I see this on the Libgdx site,

“Desktop/Android/BlackBerry/iOS/HTML5 Java game development framework”

That looks to me like I can write something in Java, compile it, and voila, it works on all these platforms. That does not seem to be the case, however. Do I misunderstand? Thanks again for your patience.

Your thinking is right, it compiles it to what is needs.

Forvinstance, HTML5. It gets wrapped in Java script.

But don’t you have to get all kinds of other programs, so it can do that?

There’s this thing called JNI. I’m not too familiar with it, but it’s what LWJGL uses to boil everything down to C code to be used with the OpenGL API. That’s what it uses for Desktop, I know that.

Well, for the desktop platforms, it’s still Java code running, but libGDX/LWJGL also makes calls to native code such as OpenGL and Box2D. See JNI and JNA for how that works.

The RoboVM business does compile the Java bytecode to native code as you can see at the bottom of their getting started page.

Web is covered by “translating” to JavaScript (GWT I believe, might be for Android, I forget) and WebGL instead of OpenGL. Asm.js is an example of that process.

Really if you just look up the names of the various technologies that libGDX mentions it uses, you’ll find out how it works.