These are the requirements to compile libgdx-cpp over linux(ubuntu):
- cmake
- libsdl
- libgles1-mesa-dev
- libgles2-mesa-dev
- libopenal-dev
- create a build dir somewhere on your home partition
- cmake PATH-TO-CHECKED-OUT-LIBGDXCPP
- ccmake .
- Edit your configuration as needed
- make
Libraries will be generated under the lib folder, binaries under the bin folder
- Create/Symlink the data folder to the assets directory
- Execute the desired test
LibgdxCpp uses the cmake toolset from android-cmake. Sadly, currently cmake doesn't support multiple toolsets under the same build directory, so you'll have to create another build folder.
Requirements:
- Android r5b or newer (platform9)
- Eclipse + DDMS (to actually build the apk's)
- create a build dir somewhere on your home partition
- cmake -DCMAKE_TOOLCHAIN_FILE=PATH-TO-CLONED-LIBGDXCPP/cmake/android.toolchain.cmake PATH-TO-CLONED-LIBGDXCPP
- ccmake .
- Edit your configuration as needed
- make
Libraries will be generated under the lib folder, binaries under the bin folder
- Import the Eclipse project under PATH-TO-CLONED-LIBGDXCPP/src/backends/gdx-cpp-backend-android/android-support
- Import the Eclipse project under PATH-TO-CLONED-LIBGDXCPP/src/test/backend/android (I'll call it test-project from now)
- Under Eclipse, edit the test project to point to the android support library (witch you imported on step 1)
- Under the test-project/libs you'll have to symlink the required shared libraries to make the test run.If you compiled the backend to armeabi it will be test-project/libs/armeabi. If armeabi-v7a it will be under test-project/libs/armeabi-v7a. Make sure you symlinked all requirements (like libgdx-cpp, libgdx-box2d, libBox2D, and so on)
- Under Eclipse, change the initializeWithSharedLib method to the desired library without the lib prefix on it.
- Run the project and pray for the Android gods
The texture class constructors that received an managed texture data had to be changed to static constructors. This is because C++ contruction blocks us to use shared_pointers, so we had to make it two-phase-like. So instead of calling the constructor, you'll have to call, for example:
Texture::fromFile()
whith the same parameters that you would expect on the constructor.
- The linux backend has file and input working
- The android backend has input working
- Backend polishing. Seriously, it's working, but there is a lot of stuff that is ugly and were fast-made.
- iOs support
- etc