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.

158 lines
7.7KB

  1. <!DOCTYPE html>
  2. <head>
  3. <meta charset="utf-8" />
  4. <!-- Set the viewport width to device width for mobile -->
  5. <meta name="viewport" content="width=device-width" />
  6. <title>October 2016 recap</title>
  7. <link rel="stylesheet" href="http://opengamestudio.org/theme/css/normalize.css" />
  8. <link rel="stylesheet" href="http://opengamestudio.org/theme/css/foundation.min.css" />
  9. <link rel="stylesheet" href="http://opengamestudio.org/theme/css/style.css" />
  10. <link rel="stylesheet" href="http://opengamestudio.org/theme/css/pygments.css" />
  11. <script src="http://opengamestudio.org/theme/js/custom.modernizr.js"></script>
  12. <!-- So Firefox can bookmark->"abo this site" -->
  13. <link href="feeds/all.atom.xml" rel="alternate" title="Opensource Game Studio" type="application/atom+xml">
  14. </head>
  15. <body>
  16. <!-- Nav Bar -->
  17. <nav>
  18. <!-- Show menu items and pages -->
  19. <div class="row">
  20. <div class="large-12 columns top-bar">
  21. <h1><a href="http://opengamestudio.org">Opensource Game Studio</a></h1>
  22. </div>
  23. </div>
  24. <div class="row top-menu">
  25. <div class="large-12 columns">
  26. <a href="/pages/games.html" class="menu-button secondary">Games</a>
  27. <a href="/pages/education.html" class="menu-button secondary">Education</a>
  28. <a href="/pages/about.html" class="menu-button secondary">About</a>
  29. </div>
  30. </div>
  31. </nav>
  32. <!-- End Nav -->
  33. <!-- Main Page Content and Sidebar -->
  34. <div class="row">
  35. <!-- Main Blog Content -->
  36. <div class="large-9 columns">
  37. <article>
  38. <header>
  39. <h3 class="article-title"><a href="http://opengamestudio.org/2016-october-recap.html" rel="bookmark"
  40. title="Permalink to October 2016 recap">October 2016 recap</a></h3>
  41. </header>
  42. <h6 class="subheader" title="2016-11-19T00:00:00+03:00">Сб 19 ноября 2016
  43. <a class="button secondary small translation-button" href="http://opengamestudio.org/2016-october-recap-ru.html">ru</a>
  44. </h6> <p><img alt="October recap" src="http://opengamestudio.org/2016-11-19_2016-october-recap.png"></p>
  45. <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>
  46. <p><strong>First attempt to build OSG.</strong></p>
  47. <p>Having no prior knowledge of Android development, we grabbed the latest Android Studio and started doing beginner tutorials.
  48. We passed Java part pretty fast. Everything worked out of the box. Then came C++ part and related problems.</p>
  49. <p><strong>CMake. </strong>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>
  50. <p><strong>KVM. </strong>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>
  51. <p><strong>Chroot for Android. </strong>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>
  52. <p><strong>OSG. </strong>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.
  53. Searching for the problem did not reveal any hint.
  54. Nobody helped us at the OSG mailing list.</p>
  55. <p>We were in despair.</p>
  56. <p><strong>The search for OSG alternatives.</strong></p>
  57. <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>
  58. <p>And we found it: <a href="http://babylonhx.gamestudiohx.com/">BabylonHX</a>. The home page looked awesome: it rendered WebGL in the background!
  59. We thought we finally found the gem we were looking for. However, the example on the home page simply did not work.</p>
  60. <p>You can probably understand our feelings at the time.</p>
  61. <p><strong>The success in building OSG.</strong></p>
  62. <p>We realized nobody would make OSG work under Android for us. We had to do it ourselves.</p>
  63. <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>.
  64. While following it, we faced a dead link to third party dependencies.
  65. 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>
  66. <p>After following the tutorial, we finally got OSG to run under Android!
  67. But there was a nuance: both OSG and Android tools used in the tutorial were ancient.
  68. In a few days, we gradually updated both OSG and Android tools to their latest versions.</p>
  69. <p>During the update process, we learned two things that prevented us from having OSG to work in the first place:</p>
  70. <ul>
  71. <li>Android API headers changed in NDK r12</li>
  72. <li>OSG only works as a static library under Android</li>
  73. </ul>
  74. <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>
  75. <p class="subheader">Category: <a href="http://opengamestudio.org/category/news.html">News</a>
  76. </p>
  77. </article>
  78. </div>
  79. <!-- End Main Content -->
  80. <!-- Sidebar -->
  81. <aside class="large-3 columns">
  82. <!--k
  83. <h5 class="sidebar-title">Site</h5>
  84. <ul class="side-nav">
  85. <li><a href="http://opengamestudio.org/archives.html">Archives</a>
  86. <li><a href="http://opengamestudio.org/tags.html">Tags</a>
  87. <li><a href="http://opengamestudio.org/feeds/all.atom.xml" rel="alternate">Atom feed</a></li>
  88. </ul>
  89. <h5 class="sidebar-title">Categories</h5>
  90. <ul class="side-nav">
  91. <li><a href="http://opengamestudio.org/category/news.html">News</a></li>
  92. </ul>
  93. -->
  94. <h5 class="sidebar-title">Ads</h5>
  95. <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
  96. <!-- ogs2 -->
  97. <ins class="adsbygoogle"
  98. style="display:block"
  99. data-ad-client="ca-pub-4473792248813084"
  100. data-ad-slot="9024247127"
  101. data-ad-format="auto"></ins>
  102. <script>
  103. (adsbygoogle = window.adsbygoogle || []).push({});
  104. </script>
  105. </aside> <!-- End Sidebar -->
  106. </div> <!-- End Main Content and Sidebar -->
  107. <!-- Footer -->
  108. <footer class="row">
  109. <div class="large-12 columns">
  110. <hr />
  111. <div class="row">
  112. <div class="large-7 columns">
  113. <p>Proudly powered by <a href="http://getpelican.com">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.</p>
  114. </div>
  115. </div>
  116. </div>
  117. <script type="text/javascript">
  118. var _gaq = _gaq || [];
  119. _gaq.push(['_setAccount', 'UA-3773114-1']);
  120. _gaq.push(['_trackPageview']);
  121. (function() {
  122. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  123. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  124. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  125. })();
  126. </script>
  127. </footer>