25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

97 satır
6.0KB

  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/examples-and-dependencies.html">EN</a>
  14. <a href="../../ru/news/examples-and-dependencies.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="examples-and-dependencies.html">Examples and dependencies</a>
  35. </h2>
  36. <p class="news_item_date">
  37. 2018-08-21 00:00
  38. </p>
  39. <div class="news_item_contents">
  40. <p><img src="../../images/2018-08-21-examples-and-dependencies.png" alt="Cloud" /></p>
  41. <p>This article describes two new OpenSceneGraph cross-platform examples and the change in handling dependencies.</p>
  42. <p><strong>Examples of HTTP client and node selection</strong></p>
  43. <p>Once we finished working on <a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples/tree/master/04.RemoteDebugging">the remote debugging example</a> and <a href="example-driven-development.html">reported its completion</a>, we were surprised by the fact that secure HTTP connection between a debugged application and debug broker was only working in the web version of the example. Desktop and mobile versions only worked with insecure HTTP.</p>
  44. <p>Since current debug scheme has no authentication, insecure debugging over HTTP doesn't really hurt. However, if we want to access resources located at popular sites like GitHub and BitBucket, we have to support secure HTTP.</p>
  45. <p>The need to support HTTPS on each platform spurred us to create <a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples/tree/master/03.HTTPClient">HTTP client example</a>. Turned out, each platform had its own preferred way of doing secure HTTP:</p>
  46. <ul>
  47. <li>web (Emscripten) provides Fetch API</li>
  48. <li>desktop is fine with Mongoose and OpenSSL</li>
  49. <li>Android provides HttpUrlConnection in Java</li>
  50. <li>iOS provides NSURLSession in Objective-C</li>
  51. </ul>
  52. <p>The need to support different languages on different platforms resulted in the creation of so-called 'host-guest' pattern:</p>
  53. <ul>
  54. <li>guest (platform agnostic)<ul>
  55. <li>provides networking representation</li>
  56. <li>used by cross-platform C++ code</li></ul></li>
  57. <li>host (specific platform)<ul>
  58. <li>polls guest for pending requests</li>
  59. <li>processes them</li>
  60. <li>reports results back to the guest</li></ul></li>
  61. </ul>
  62. <p><a href="https://github.com/OGStudio/openscenegraph-cross-platform-examples/tree/master/05.NodeSelection">Node selection example</a> was straightforward and caused no troubles.</p>
  63. <p><strong>The change in handling dependencies</strong></p>
  64. <p>For over a year we had to deal with the following <a href="http://forum.openscenegraph.org/viewtopic.php?t=17443">shortcomings</a> when building OpenSceneGraph across platforms using conventional methods:</p>
  65. <ul>
  66. <li>macOS builds failing due to certain compile flags we use</li>
  67. <li>hacking PNG plugin safety guards to have PNG support under Android</li>
  68. <li>iOS simulator and device builds of the same example being in separate Xcode projects</li>
  69. <li>OpenSceneGraph taking 20-30 minutes to build</li>
  70. </ul>
  71. <p>These shortcomings were slowing us down and complicating the development of new examples. Upon hitting these problems ten more times this month we decided it was time to solve them once and for all. Now OpenSceneGraph is built as part of each example in 2-3 minutes, and there's no more dependency magic involved. We took the same approach of building dependencies as part of each example to other external libraries like Mongoose and libpng-android, too.</p>
  72. <p>With these obstacles out of the way, we can now iterate faster. Just in time for the next technical demonstration of Mahjong 2!</p>
  73. <p>That's it for describing two new OpenSceneGraph cross-platform examples and the change in handling dependencies.</p>
  74. </div>
  75. </div>
  76. <div id="disqus_thread"></div>
  77. <script>
  78. var disqus_config = function () {
  79. this.page.url = "https://opengamestudio.org/en/news/examples-and-dependencies.html";
  80. this.page.identifier = "examples-and-dependencies.html";
  81. };
  82. (function() { // DON'T EDIT BELOW THIS LINE
  83. var d = document, s = d.createElement('script');
  84. s.src = 'https://opengamestudio.disqus.com/embed.js';
  85. s.setAttribute('data-timestamp', +new Date());
  86. (d.head || d.body).appendChild(s);
  87. })();
  88. </script>
  89. <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  90. <div id="footer">
  91. The site has been generated by <a href="http://opengamestudio.org/pskov">PSKOV</a>
  92. from <a href="http://github.com/ogstudio/site-opengamestudio">this source code</a>.
  93. </div>
  94. </center>
  95. </body>
  96. </html>