Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

88 linhas
6.3KB

  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>
  11. <strong id="title">Open Game Studio</strong>
  12. <div id="lang">
  13. <a href="../../en/news/2016-october-recap.html">EN</a>
  14. <a href="../../ru/news/2016-october-recap.html">RU</a>
  15. </div>
  16. </div>
  17. <div class="header2">
  18. <div class="menu">
  19. <a href="../../en/news/index.html">News</a>
  20. <a href="../../en/game/index.html">Games</a>
  21. <a href="../../en/tool/index.html">Tools</a>
  22. <a href="../../en/page/about.html">About</a>
  23. </div>
  24. <a class="discord" href="https://discord.gg/3A6THQabNf">
  25. <img src="../../images/discord.png"></img>
  26. </a>
  27. <div class="clear"></div>
  28. </div>
  29. </div>
  30. <h3 class="left_item_title">In the news...</h3>
  31. <center>
  32. <div class="news_item">
  33. <h2 class="news_item_title">
  34. <a href="2016-october-recap.html">October 2016 recap</a>
  35. </h2>
  36. <p class="news_item_date">
  37. 2016-11-19 00:00
  38. </p>
  39. <div class="news_item_contents">
  40. <p><img src="../../images/2016-11-19_2016-october-recap.png" alt="Gaining Android support was like climbing a mountain for us" /></p>
  41. <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>
  42. <p><strong>First attempt to build OSG.</strong></p>
  43. <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>
  44. <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>
  45. <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>
  46. <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>
  47. <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.
  48. Searching for the problem did not reveal any hint.
  49. Nobody helped us at the OSG mailing list.</p>
  50. <p>We were in despair.</p>
  51. <p><strong>The search for OSG alternatives.</strong></p>
  52. <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>
  53. <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>
  54. <p>You can probably understand our feelings at the time.</p>
  55. <p><strong>The success in building OSG.</strong></p>
  56. <p>We realized nobody would make OSG work under Android for us. We had to do it ourselves.</p>
  57. <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>
  58. <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>
  59. <p>During the update process, we learned two things that prevented us from having OSG to work in the first place:</p>
  60. <ul>
  61. <li>Android API headers changed in NDK r12</li>
  62. <li>OSG only works as a static library under Android</li>
  63. </ul>
  64. <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>
  65. </div>
  66. </div>
  67. <div id="disqus_thread"></div>
  68. <script>
  69. var disqus_config = function () {
  70. this.page.url = "https://opengamestudio.org/en/news/2016-october-recap.html";
  71. this.page.identifier = "2016-october-recap.html";
  72. };
  73. (function() { // DON'T EDIT BELOW THIS LINE
  74. var d = document, s = d.createElement('script');
  75. s.src = 'https://opengamestudio.disqus.com/embed.js';
  76. s.setAttribute('data-timestamp', +new Date());
  77. (d.head || d.body).appendChild(s);
  78. })();
  79. </script>
  80. <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  81. <div id="footer">
  82. The site has been generated by <a href="http://opengamestudio.org/pskov">PSKOV</a>
  83. from <a href="http://github.com/ogstudio/site-opengamestudio">this source code</a>.
  84. </div>
  85. </center>
  86. </body>
  87. </html>