25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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