I have a project which has a native android OpenGL implementation. MyView extends GLSurfaceView and MyRenderer implements GLSurfaceView.Renderer. I’m not satisfied with the implementation, because it was done in a hurry and is improper. I’d like to change it to a LibGDX implementation. A couple of questions, is it worth it? I’m not using any native code for my existing opengl implementation, I’m not really familiar with C/C++ code. So will I see a performance improvement by changing over to LibGDX. Second, how hard is it to do. I’m just starting out with LibGDX, got the app to run on my device. Am I better off investing time in NDK or LibGDX?
I have a project which has a native android OpenGL implementation. MyView extends GLSurfaceView
Share
If you’re not really familiar with C/C++, then it’s probably not going to help your project to switch to the NDK. You’re going to slow down your progress to make any framework change, and adding a new language is only going to compound the delay.
As for moving to libgdx, that might be a worthwhile investment of time. The main advantage I found when switch from native android to libgdx was that you could run your app straight on your desktop. The emulator is too slow to run games, so normally all your testing has to be on your phone, which is slow and aggravating. With libgdx, it runs right away, and all you have to do is export a different project to get an apk. I found that was also a good way to test screen sizes: you can just resize the window instead of creating a bunch of virtual devices.
I guess the main disadvantage to running libgdx is that you don’t get direct access to the android framework. I worked around this (using different Activities for menus, for example) by adding those to the android project. The libgdx project was essentially just the core of the game.