You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2016-october-recap.html 6.1KB

пре 3 година
пре 3 година
пре 1 месец
пре 3 година
пре 5 година
пре 5 година
пре 5 година
пре 5 година
пре 5 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!DOCTYPE html>
  2. <html>
  3. <meta charset="utf-8">
  4. <head>
  5. <link rel="stylesheet" href="../../style.css">
  6. </head>
  7. <body>
  8. <script data-goatcounter="https://services.opengamestudio.org:443/count" async src="//services.opengamestudio.org:443/count.js"></script>
  9. <div id="header">
  10. <div class="header2">
  11. <div class="menu">
  12. <a href="../../en/news/index.html">News</a>
  13. <a href="../../en/game/index.html">Games</a>
  14. <a href="../../en/tool/index.html">Tools</a>
  15. <a href="../../en/page/about.html">About</a>
  16. </div>
  17. <div id="lang">
  18. <a href="../../en/news/2016-october-recap.html">EN</a>
  19. <a href="../../ru/news/2016-october-recap.html">RU</a>
  20. </div>
  21. <div class="clear"></div>
  22. </div>
  23. </div>
  24. <h3 class="left_item_title">In the news...</h3>
  25. <center>
  26. <div class="news_item">
  27. <h2 class="news_item_title">
  28. <a href="2016-october-recap.html">October 2016 recap</a>
  29. </h2>
  30. <p class="news_item_date">
  31. 2016-11-19 00:00
  32. </p>
  33. <div class="news_item_contents">
  34. <p><img src="../../images/2016-11-19_2016-october-recap.png" alt="Gaining Android support was like climbing a mountain for us" /></p>
  35. <p>This article describes how we spent a month building OpenSceneGraph (OSG) for Android: the first attempt to build OSG, the search for OSG alternatives, and the success in building OSG.</p>
  36. <p><strong>First attempt to build OSG.</strong></p>
  37. <p>Having no prior knowledge of Android development, we grabbed the latest Android Studio and started doing beginner tutorials. We passed Java part pretty fast. Everything worked out of the box. Then came C++ part and related problems.</p>
  38. <p>**CMake. **To work with C++, Android Studio uses custom CMake, which conflicts with the system one. This was a clear indication that we had to set up a separate development environment specifically for Android.</p>
  39. <p>**KVM. **We got Ubuntu under VirtualBox installed. All went fine until we tried to use Android Emulator. Turned out, VirtualBox could not run Android Emulator, because a virtual machine cannot provide kernel virtualization inside already virtualized environment.</p>
  40. <p>**Chroot for Android. **Since we had a successful experience with chroot to build OGS Editor before, we decided to place Android development environment into chroot. With minor tweaking, we could finally run Android Emulator and build C++ project.</p>
  41. <p>**OSG. **Building OSG seemed like a piece of cake at the time. However, all we got was a crash. Thinking that we got it wrong the first time, we tried to rebuild OSG once again. And the same crash again.
  42. Searching for the problem did not reveal any hint.
  43. Nobody helped us at the OSG mailing list.</p>
  44. <p>We were in despair.</p>
  45. <p><strong>The search for OSG alternatives.</strong></p>
  46. <p>Since OSG community did not help us, we decided to search for an alternative open source project to fit our Android needs (and may be more).</p>
  47. <p>And we found it: <a href="http://babylonhx.gamestudiohx.com/">BabylonHX</a>. The home page looked awesome: it rendered WebGL in the background! We thought we finally found the gem we were looking for. However, the example on the home page simply did not work.</p>
  48. <p>You can probably understand our feelings at the time.</p>
  49. <p><strong>The success in building OSG.</strong></p>
  50. <p>We realized nobody would make OSG work under Android for us. We had to do it ourselves.</p>
  51. <p>Since <a href="http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/178-building-openscenegraph-for-android-3-4">OSG 3.4 document</a> on building for Android was very short, we no longer trusted it and headed to <a href="http://www.openscenegraph.org/index.php/documentation/platform-specifics/android/44-building-openscenegraph-for-android-3-0-3-0-1">original OSG 3.0 document</a>. While following it, we faced a dead link to third party dependencies. The search for an alternative download link lead us to a <a href="https://xinyustudio.wordpress.com/2013/09/24/install-osg-for-android-on-ubuntu-13-04-step-by-step-tutorials/">2013 tutorial</a> on building OSG 3.0 for Android.</p>
  52. <p>After following the tutorial, we finally got OSG to run under Android! But there was a nuance: both OSG and Android tools used in the tutorial were ancient. In a few days, we gradually updated both OSG and Android tools to their latest versions.</p>
  53. <p>During the update process, we learned two things that prevented us from having OSG to work in the first place:</p>
  54. <ul>
  55. <li>Android API headers changed in NDK r12</li>
  56. <li>OSG only works as a static library under Android</li>
  57. </ul>
  58. <p>That's it for describing how we spent the month building OSG for Android: the first attempt to build OSG, the search for OSG alternatives, and the success in building OSG.</p>
  59. </div>
  60. </div>
  61. <div id="disqus_thread"></div>
  62. <script>
  63. var disqus_config = function () {
  64. this.page.url = "https://opengamestudio.org/en/news/2016-october-recap.html";
  65. this.page.identifier = "2016-october-recap.html";
  66. };
  67. (function() { // DON'T EDIT BELOW THIS LINE
  68. var d = document, s = d.createElement('script');
  69. s.src = 'https://opengamestudio.disqus.com/embed.js';
  70. s.setAttribute('data-timestamp', +new Date());
  71. (d.head || d.body).appendChild(s);
  72. })();
  73. </script>
  74. <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  75. <div id="footer">
  76. The site has been generated by <a href="http://opengamestudio.org/pskov">PSKOV</a>
  77. from <a href="http://github.com/ogstudio/site-opengamestudio">this source code</a>.
  78. </div>
  79. </center>
  80. </body>
  81. </html>