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
- cd to PATH-TO-CLONED-LIBGDXCPP/src/backends/gdx-cpp-backend-android/android-support
- 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)
- Open LibGdxCppTestActivity.java (under src), change the initializeWithSharedLib method to the desired library without the lib prefix on it.
- ant install
-
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()
with the same parameters that you would expect on the constructor.
- The pixmap class was converted to an interface
Analogically, the calls to create an PixMap now are:
Pixmap::newFromFile()
Pixmap::newFromPixmap()
Pixmap::newFromRect()
- The Pixmap class has turned into an interface. This had to be done because we can have different pixmap backends (currently we have Svg and Gdx2d). The gdx_cpp::Graphics interface now have to handle the TextureData and Pixmap resolution and creation. This was made to decouple the texture class from determining how to load and create TextureData (etc1, wich is not supported in all platforms per example).
- The linux backend has file,input and audio working
- The android backend has input, file and audio working
- SVG support through AntiGrainGeometry
- Backend polishing. Seriously, it's working, but there is a lot of stuff that is ugly and in a haste.
- iOs support
- GLEs 2. Check if it's working
- etc