Android port
#81
Posted 01 February 2012 - 10:41 AM
Incidentally, don't remember if this has been mentioned before, but it's impossible (or at least discouraged and unportable and seemingly undocumented) to use GLES with pure C++ - you have to use some Java to set up EGL windows before the C++ can render into it. SDL provides the necessary Java code, and SDL's android-project can build it: when you run "ndk-build" it builds libSDL2.so and libmain.so, and when you run "ant debug" it compiles the Java code and packages everything into an .apk file. (Then you do an "adb push whatever.apk /data/app" to install it onto the device). I imagine it would be easier to write a custom script to perform those build steps, instead of trying to integrate our existing code into ndk-build, but I don't know exactly what's required.
Unfortunately the Android emulator doesn't seem to do GLES2 - I can compile and run a simple SDL test application but it just prints "E/libEGL ( 504): called unimplemented OpenGL ES API" to logcat. At least it's possible to test that the application starts up without linker errors or Java exceptions etc, but for any graphical output it'll need to be run on real hardware.
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#82 Guest_afeder_*
Posted 01 February 2012 - 12:21 PM
historic_bruno, on 01 February 2012 - 01:25 AM, said:
Updated output from latest svn
Ykkrosh, on 01 February 2012 - 10:41 AM, said:
#83
Posted 02 February 2012 - 11:14 AM
afeder, on 01 February 2012 - 12:21 PM, said:
Quote
Incidentally, about the libraries bundled with the game: there's probably no point porting NVTT to Android, since it's used for S3TC texture compression and most mobile GPUs don't support S3TC; I think we should disable that code and load uncompressed textures instead. (Then, if not everybody has got fed up with Android, experiment with ETC1 to save VRAM, and/or JPEG to save download size, etc.)
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#84 Guest_afeder_*
Posted 02 February 2012 - 01:23 PM
Ykkrosh, on 02 February 2012 - 11:14 AM, said:
#85 Guest_afeder_*
Posted 03 February 2012 - 01:10 PM
Ykkrosh, on 02 February 2012 - 11:14 AM, said:
#86
Posted 03 February 2012 - 02:23 PM
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#88 Guest_afeder_*
Posted 04 February 2012 - 07:44 PM
Ykkrosh, on 03 February 2012 - 02:23 PM, said:
Would it be feasible to port the parts of the code using wstrings to some other Android-compatible representation? The wstrings are the only thing preventing me using the latest official NDK, which SpiderMonkey seems set up for.
Edit: I'm going to try if I can use another toolchain in parallel specifically to build Spidermonkey. Theoretically, it should not be a problem since the NDK API is intended to be stable across releases.
Edited by afeder, 05 February 2012 - 12:21 AM.
#89
Posted 05 February 2012 - 12:02 PM
afeder, on 04 February 2012 - 07:44 PM, said:
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#90 Guest_afeder_*
Posted 06 February 2012 - 03:25 AM
Ykkrosh, on 03 February 2012 - 02:23 PM, said:
/home/afeder/android/js-1.8.5/js/src/jscpucfg.cpp:48:21: fatal error: prtypes.h: No such file or directory
Edited by afeder, 06 February 2012 - 05:35 AM.
#91
Posted 06 February 2012 - 12:40 PM
afeder, on 06 February 2012 - 03:25 AM, said:
Quote
/home/afeder/android/js-1.8.5/js/src/jscpucfg.cpp:48:21: fatal error: prtypes.h: No such file or directory
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#92
Posted 06 February 2012 - 08:16 PM
Ykkrosh, on 01 February 2012 - 10:41 AM, said:
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#93 Guest_afeder_*
Posted 06 February 2012 - 09:05 PM
Ykkrosh, on 06 February 2012 - 12:40 PM, said:
Quote
The full diff of changes/hacks I had to make is here.
#94 Guest_afeder_*
Posted 10 February 2012 - 12:15 AM
afeder@ubuntu:~/android/toolchain/sysroot$ ls $PKG_CONFIG_SYSROOT_DIR/usr/local/lib/pkgconfig/mozjs185.pc /home/afeder/android/toolchain/sysroot/usr/local/lib/pkgconfig/mozjs185.pc afeder@ubuntu:~/android/toolchain/sysroot$ pkg-config mozjs185 --cflags Package mozjs185 was not found in the pkg-config search path. Perhaps you should add the directory containing `mozjs185.pc' to the PKG_CONFIG_PATH environment variable No package 'mozjs185' foundAccording to the man page of pkg-config, /usr/local/lib/pkgconfig is supposed to be one of the default search paths.
Edit: I guess pkg-config doesn't actually search the sysroot, it just prepends it to the absolute paths
Edit2: I fixed this by using the PKG_CONFIG_LIBDIR variable.
Edited by afeder, 11 February 2012 - 06:11 AM.
#95 Guest_afeder_*
Posted 11 February 2012 - 06:32 AM
/source/simulation2/components/CCmpRallyPointRenderer.cpp /source/simulation2/components/CCmpTerritoryManager.cpp /source/ps/Profiler2GPU.cpp /source/ps/ProfileViewer.cpp /source/ps/CLogger.cpp /source/ps/Util.cpp /source/ps/CConsole.cpp /source/ps/GameSetup/HWDetect.cpp /source/ps/GameSetup/GameSetup.cpp /source/maths/Brush.cpp /source/maths/BoundingBoxAligned.cpp /source/graphics/Material.cpp /source/graphics/ShaderTechnique.cpp /source/graphics/Camera.cpp /source/graphics/ParticleEmitter.cpp /source/graphics/ObjectEntry.cpp /source/graphics/TerritoryTexture.cpp /source/graphics/LOSTexture.cpp /source/graphics/Sprite.cpp /source/graphics/ShaderProgramFFP.cpp /source/graphics/CinemaTrack.cpp /source/renderer/DecalRData.cpp /source/renderer/ParticleRenderer.cpp /source/renderer/HWLightingModelRenderer.cpp /source/renderer/TerrainRenderer.cpp /source/renderer/ShadowMap.cpp /source/renderer/PlayerRenderer.cpp /source/renderer/ModelRenderer.cpp /source/renderer/RenderModifiers.cpp /source/renderer/PatchRData.cpp /source/renderer/OverlayRenderer.cpp /source/renderer/SkyManager.cpp /source/renderer/InstancingModelRenderer.cpp /source/renderer/Renderer.cpp /source/renderer/FixedFunctionModelRenderer.cpp /source/renderer/TerrainOverlay.cpp /source/renderer/VertexBuffer.cpp /source/renderer/TransparencyRenderer.cpp /source/tools/atlas/GameInterface/ActorViewer.cpp /source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp /source/gui/CGUI.cpp /source/gui/GUIRenderer.cpp /source/gui/MiniMap.cpp /source/lib/res/graphics/unifont.cpp /source/lib/res/graphics/ogl_tex.cppWhich of these would characterize as being "non-GUI"? And how do you suggest I remove them from the build system?
#96
Posted 11 February 2012 - 11:20 AM
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#97 Guest_afeder_*
Posted 11 February 2012 - 02:35 PM
#98
Posted 11 February 2012 - 03:03 PM
The source files aren't actually listed anywhere - build/premake/premake4.lua lists directories, and it searches for all *.cpp inside them.
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#99 Guest_afeder_*
Posted 11 February 2012 - 03:07 PM
#100 Guest_afeder_*
Posted 11 February 2012 - 03:15 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













