ogre.rb 0.1-i686-linux

Sign up to get free protection for your applications and to get access to all the features.
Files changed (430) hide show
  1. data/README +79 -0
  2. data/Rakefile +288 -0
  3. data/doc_src/ogre.rb +246 -0
  4. data/doc_src/ois.rb +67 -0
  5. data/lib/application.rb +146 -0
  6. data/lib/application_frame_listener.rb +302 -0
  7. data/lib/application_loading_bar.rb +115 -0
  8. data/lib/constants.rb +51 -0
  9. data/lib/method_fixes.rb +42 -0
  10. data/lib/ogre.so +0 -0
  11. data/lib/ruby_ois.so +0 -0
  12. data/ogre.rb +25 -0
  13. data/platform.rb +23 -0
  14. data/samples/Ogre.log +261 -0
  15. data/samples/bsp.rb +76 -0
  16. data/samples/cg.dll +0 -0
  17. data/samples/grass.rb +325 -0
  18. data/samples/js3250.dll +0 -0
  19. data/samples/lighting.rb +138 -0
  20. data/samples/media/materials/programs/Grass.cg +30 -0
  21. data/samples/media/materials/programs/OffsetMapping.cg +97 -0
  22. data/samples/media/materials/programs/OffsetMapping.hlsl +135 -0
  23. data/samples/media/materials/programs/OffsetMappingFp.glsl +69 -0
  24. data/samples/media/materials/programs/OffsetMappingVp.glsl +54 -0
  25. data/samples/media/materials/programs/OffsetMapping_specular.asm +44 -0
  26. data/samples/media/materials/scripts/CloudySky.material +17 -0
  27. data/samples/media/materials/scripts/CubeMapping.material +34 -0
  28. data/samples/media/materials/scripts/Flare.material +17 -0
  29. data/samples/media/materials/scripts/Grass.material +63 -0
  30. data/samples/media/materials/scripts/Knot.material +14 -0
  31. data/samples/media/materials/scripts/MorningSkyBox.material +17 -0
  32. data/samples/media/materials/scripts/Offset.material +124 -0
  33. data/samples/media/materials/scripts/Ogre.material +119 -0
  34. data/samples/media/materials/scripts/RZR-002.material +15 -0
  35. data/samples/media/materials/scripts/Razor.material +14 -0
  36. data/samples/media/materials/scripts/Ribbon.material +19 -0
  37. data/samples/media/materials/scripts/RustySteel.material +14 -0
  38. data/samples/media/materials/scripts/SpaceSkyBox.material +17 -0
  39. data/samples/media/materials/scripts/SpaceSkyPlane.material +17 -0
  40. data/samples/media/materials/scripts/TextureEffects.material +15 -0
  41. data/samples/media/materials/scripts/dragon.material +42 -0
  42. data/samples/media/materials/scripts/smoke.material +18 -0
  43. data/samples/media/materials/textures/GreenSkin.jpg +0 -0
  44. data/samples/media/materials/textures/MtlPlat2.jpg +0 -0
  45. data/samples/media/materials/textures/RZR-002.png +0 -0
  46. data/samples/media/materials/textures/RustedMetal.jpg +0 -0
  47. data/samples/media/materials/textures/RustySteel.jpg +0 -0
  48. data/samples/media/materials/textures/Water02.jpg +0 -0
  49. data/samples/media/materials/textures/WeirdEye.png +0 -0
  50. data/samples/media/materials/textures/clouds.jpg +0 -0
  51. data/samples/media/materials/textures/cursor.png +0 -0
  52. data/samples/media/materials/textures/dirt01.jpg +0 -0
  53. data/samples/media/materials/textures/flare.png +0 -0
  54. data/samples/media/materials/textures/gras_02.png +0 -0
  55. data/samples/media/materials/textures/grass_1024.jpg +0 -0
  56. data/samples/media/materials/textures/ogreborder.png +0 -0
  57. data/samples/media/materials/textures/ogreborderUp.png +0 -0
  58. data/samples/media/materials/textures/ribbonband.png +0 -0
  59. data/samples/media/materials/textures/rockwall.tga +0 -0
  60. data/samples/media/materials/textures/rockwall_NH.tga +0 -0
  61. data/samples/media/materials/textures/smoke.png +0 -0
  62. data/samples/media/materials/textures/smokecolors.png +0 -0
  63. data/samples/media/materials/textures/spacesky.jpg +0 -0
  64. data/samples/media/materials/textures/spheremap.png +0 -0
  65. data/samples/media/materials/textures/texmap2.jpg +0 -0
  66. data/samples/media/models/RZR-002.mesh +0 -0
  67. data/samples/media/models/geosphere4500.mesh +0 -0
  68. data/samples/media/models/geosphere8000.mesh +0 -0
  69. data/samples/media/models/knot.mesh +0 -0
  70. data/samples/media/models/ogrehead.mesh +0 -0
  71. data/samples/media/models/razor.mesh +0 -0
  72. data/samples/media/models/sphere.mesh +0 -0
  73. data/samples/media/overlays/CubeMapping.overlay +139 -0
  74. data/samples/media/packs/OgreCore.zip +0 -0
  75. data/samples/media/packs/chiropteraDM.pk3 +0 -0
  76. data/samples/media/packs/chiropteraDM.txt +99 -0
  77. data/samples/media/packs/cubemap.zip +0 -0
  78. data/samples/media/packs/cubemapsJS.zip +0 -0
  79. data/samples/media/packs/dragon.zip +0 -0
  80. data/samples/media/packs/skybox.zip +0 -0
  81. data/samples/media/particles/smoke.particle +43 -0
  82. data/samples/media.cfg +22 -0
  83. data/samples/navi/Media/NaviDemo.material +60 -0
  84. data/samples/navi/Media/OgreCore.zip +0 -0
  85. data/samples/navi/Media/cerulean.jpg +0 -0
  86. data/samples/navi/Media/clouds.jpg +0 -0
  87. data/samples/navi/Media/controlsNaviMask.png +0 -0
  88. data/samples/navi/Media/grass.jpg +0 -0
  89. data/samples/navi/Media/knot.mesh +0 -0
  90. data/samples/navi/Media/testNaviMask.png +0 -0
  91. data/samples/navi/NaviLocal/Navi.js +136 -0
  92. data/samples/navi/NaviLocal/buttonBg.jpg +0 -0
  93. data/samples/navi/NaviLocal/controls.html +303 -0
  94. data/samples/navi/NaviLocal/knobBg.jpg +0 -0
  95. data/samples/navi/NaviLocal/moo.dropdownmenu.js +87 -0
  96. data/samples/navi/NaviLocal/mootools.v1.1.js +6964 -0
  97. data/samples/navi/NaviLocal/naviLogo.html +32 -0
  98. data/samples/navi/NaviLocal/naviLogo.png +0 -0
  99. data/samples/navi/NaviLocal/pageBg.jpg +0 -0
  100. data/samples/navi/NaviLocal/sliderBg.jpg +0 -0
  101. data/samples/navi/NaviLocal/test.html +5 -0
  102. data/samples/navi/NaviLocal/welcome.html +36 -0
  103. data/samples/navi/NaviLocal/welcome.png +0 -0
  104. data/samples/navi/chrome/chromelist.txt +597 -0
  105. data/samples/navi/chrome/classic.jar +0 -0
  106. data/samples/navi/chrome/classic.manifest +4 -0
  107. data/samples/navi/chrome/comm.jar +0 -0
  108. data/samples/navi/chrome/comm.manifest +2 -0
  109. data/samples/navi/chrome/en-US.jar +0 -0
  110. data/samples/navi/chrome/en-US.manifest +9 -0
  111. data/samples/navi/chrome/toolkit.jar +0 -0
  112. data/samples/navi/chrome/toolkit.manifest +6 -0
  113. data/samples/navi/components/FeedProcessor.js +1825 -0
  114. data/samples/navi/components/alerts.xpt +0 -0
  115. data/samples/navi/components/appshell.xpt +0 -0
  116. data/samples/navi/components/appstartup.xpt +0 -0
  117. data/samples/navi/components/auth.dll +0 -0
  118. data/samples/navi/components/autocomplete.xpt +0 -0
  119. data/samples/navi/components/autoconfig.dll +0 -0
  120. data/samples/navi/components/autoconfig.xpt +0 -0
  121. data/samples/navi/components/caps.xpt +0 -0
  122. data/samples/navi/components/chardet.xpt +0 -0
  123. data/samples/navi/components/chrome.xpt +0 -0
  124. data/samples/navi/components/commandhandler.xpt +0 -0
  125. data/samples/navi/components/commandlines.xpt +0 -0
  126. data/samples/navi/components/composer.xpt +0 -0
  127. data/samples/navi/components/compreg.dat +1474 -0
  128. data/samples/navi/components/content_base.xpt +0 -0
  129. data/samples/navi/components/content_html.xpt +0 -0
  130. data/samples/navi/components/content_htmldoc.xpt +0 -0
  131. data/samples/navi/components/content_xmldoc.xpt +0 -0
  132. data/samples/navi/components/content_xslt.xpt +0 -0
  133. data/samples/navi/components/content_xtf.xpt +0 -0
  134. data/samples/navi/components/directory.xpt +0 -0
  135. data/samples/navi/components/docshell_base.xpt +0 -0
  136. data/samples/navi/components/dom.xpt +0 -0
  137. data/samples/navi/components/dom_base.xpt +0 -0
  138. data/samples/navi/components/dom_canvas.xpt +0 -0
  139. data/samples/navi/components/dom_core.xpt +0 -0
  140. data/samples/navi/components/dom_css.xpt +0 -0
  141. data/samples/navi/components/dom_events.xpt +0 -0
  142. data/samples/navi/components/dom_html.xpt +0 -0
  143. data/samples/navi/components/dom_loadsave.xpt +0 -0
  144. data/samples/navi/components/dom_range.xpt +0 -0
  145. data/samples/navi/components/dom_sidebar.xpt +0 -0
  146. data/samples/navi/components/dom_storage.xpt +0 -0
  147. data/samples/navi/components/dom_stylesheets.xpt +0 -0
  148. data/samples/navi/components/dom_svg.xpt +0 -0
  149. data/samples/navi/components/dom_traversal.xpt +0 -0
  150. data/samples/navi/components/dom_views.xpt +0 -0
  151. data/samples/navi/components/dom_xbl.xpt +0 -0
  152. data/samples/navi/components/dom_xpath.xpt +0 -0
  153. data/samples/navi/components/dom_xul.xpt +0 -0
  154. data/samples/navi/components/downloads.xpt +0 -0
  155. data/samples/navi/components/editor.xpt +0 -0
  156. data/samples/navi/components/embed_base.xpt +0 -0
  157. data/samples/navi/components/extensions.xpt +0 -0
  158. data/samples/navi/components/exthandler.xpt +0 -0
  159. data/samples/navi/components/fastfind.xpt +0 -0
  160. data/samples/navi/components/feeds.xpt +0 -0
  161. data/samples/navi/components/find.xpt +0 -0
  162. data/samples/navi/components/gfx.xpt +0 -0
  163. data/samples/navi/components/gksvgrenderer.xpt +0 -0
  164. data/samples/navi/components/history.xpt +0 -0
  165. data/samples/navi/components/htmlparser.xpt +0 -0
  166. data/samples/navi/components/imglib2.xpt +0 -0
  167. data/samples/navi/components/inspector.xpt +0 -0
  168. data/samples/navi/components/intl.xpt +0 -0
  169. data/samples/navi/components/intlcmpt.xpt +0 -0
  170. data/samples/navi/components/jar.xpt +0 -0
  171. data/samples/navi/components/jsconsole-clhandler.js +170 -0
  172. data/samples/navi/components/jsconsole.xpt +0 -0
  173. data/samples/navi/components/jsdservice.xpt +0 -0
  174. data/samples/navi/components/layout_base.xpt +0 -0
  175. data/samples/navi/components/layout_printing.xpt +0 -0
  176. data/samples/navi/components/layout_xul.xpt +0 -0
  177. data/samples/navi/components/layout_xul_tree.xpt +0 -0
  178. data/samples/navi/components/locale.xpt +0 -0
  179. data/samples/navi/components/lwbrk.xpt +0 -0
  180. data/samples/navi/components/mimetype.xpt +0 -0
  181. data/samples/navi/components/mozbrwsr.xpt +0 -0
  182. data/samples/navi/components/mozfind.xpt +0 -0
  183. data/samples/navi/components/necko.xpt +0 -0
  184. data/samples/navi/components/necko_about.xpt +0 -0
  185. data/samples/navi/components/necko_cache.xpt +0 -0
  186. data/samples/navi/components/necko_cookie.xpt +0 -0
  187. data/samples/navi/components/necko_data.xpt +0 -0
  188. data/samples/navi/components/necko_dns.xpt +0 -0
  189. data/samples/navi/components/necko_file.xpt +0 -0
  190. data/samples/navi/components/necko_ftp.xpt +0 -0
  191. data/samples/navi/components/necko_http.xpt +0 -0
  192. data/samples/navi/components/necko_res.xpt +0 -0
  193. data/samples/navi/components/necko_socket.xpt +0 -0
  194. data/samples/navi/components/necko_strconv.xpt +0 -0
  195. data/samples/navi/components/necko_viewsource.xpt +0 -0
  196. data/samples/navi/components/nsCloseAllWindows.js +143 -0
  197. data/samples/navi/components/nsDefaultCLH.js +231 -0
  198. data/samples/navi/components/nsDictionary.js +148 -0
  199. data/samples/navi/components/nsExtensionManager.js +8497 -0
  200. data/samples/navi/components/nsHelperAppDlg.js +990 -0
  201. data/samples/navi/components/nsInterfaceInfoToIDL.js +590 -0
  202. data/samples/navi/components/nsKillAll.js +200 -0
  203. data/samples/navi/components/nsPostUpdateWin.js +711 -0
  204. data/samples/navi/components/nsProgressDialog.js +949 -0
  205. data/samples/navi/components/nsProxyAutoConfig.js +396 -0
  206. data/samples/navi/components/nsResetPref.js +175 -0
  207. data/samples/navi/components/nsURLFormatter.js +179 -0
  208. data/samples/navi/components/nsUpdateService.js +3074 -0
  209. data/samples/navi/components/nsXULAppInstall.js +301 -0
  210. data/samples/navi/components/nsXmlRpcClient.js +1038 -0
  211. data/samples/navi/components/oji.xpt +0 -0
  212. data/samples/navi/components/passwordmgr.xpt +0 -0
  213. data/samples/navi/components/pipboot.xpt +0 -0
  214. data/samples/navi/components/pipnss.xpt +0 -0
  215. data/samples/navi/components/plugin.xpt +0 -0
  216. data/samples/navi/components/pref.xpt +0 -0
  217. data/samples/navi/components/prefetch.xpt +0 -0
  218. data/samples/navi/components/profile.xpt +0 -0
  219. data/samples/navi/components/progressDlg.xpt +0 -0
  220. data/samples/navi/components/proxyObject.xpt +0 -0
  221. data/samples/navi/components/rdf.xpt +0 -0
  222. data/samples/navi/components/satchel.xpt +0 -0
  223. data/samples/navi/components/saxparser.xpt +0 -0
  224. data/samples/navi/components/shistory.xpt +0 -0
  225. data/samples/navi/components/storage.xpt +0 -0
  226. data/samples/navi/components/toolkitprofile.xpt +0 -0
  227. data/samples/navi/components/transformiix.dll +0 -0
  228. data/samples/navi/components/txmgr.xpt +0 -0
  229. data/samples/navi/components/txtsvc.xpt +0 -0
  230. data/samples/navi/components/uconv.xpt +0 -0
  231. data/samples/navi/components/unicharutil.xpt +0 -0
  232. data/samples/navi/components/universalchardet.dll +0 -0
  233. data/samples/navi/components/update.xpt +0 -0
  234. data/samples/navi/components/uriloader.xpt +0 -0
  235. data/samples/navi/components/urlformatter.xpt +0 -0
  236. data/samples/navi/components/webBrowser_core.xpt +0 -0
  237. data/samples/navi/components/webbrowserpersist.xpt +0 -0
  238. data/samples/navi/components/webshell_idls.xpt +0 -0
  239. data/samples/navi/components/websrvcs.dll +0 -0
  240. data/samples/navi/components/websrvcs.xpt +0 -0
  241. data/samples/navi/components/widget.xpt +0 -0
  242. data/samples/navi/components/windowds.xpt +0 -0
  243. data/samples/navi/components/windowwatcher.xpt +0 -0
  244. data/samples/navi/components/xml-rpc.xpt +0 -0
  245. data/samples/navi/components/xmlextras.dll +0 -0
  246. data/samples/navi/components/xpcom_base.xpt +0 -0
  247. data/samples/navi/components/xpcom_components.xpt +0 -0
  248. data/samples/navi/components/xpcom_ds.xpt +0 -0
  249. data/samples/navi/components/xpcom_io.xpt +0 -0
  250. data/samples/navi/components/xpcom_obsolete.xpt +0 -0
  251. data/samples/navi/components/xpcom_thread.xpt +0 -0
  252. data/samples/navi/components/xpcom_xpti.xpt +0 -0
  253. data/samples/navi/components/xpconnect.xpt +0 -0
  254. data/samples/navi/components/xpinstall.xpt +0 -0
  255. data/samples/navi/components/xpti.dat +1424 -0
  256. data/samples/navi/components/xulapp.xpt +0 -0
  257. data/samples/navi/components/xulapp_setup.xpt +0 -0
  258. data/samples/navi/components/xuldoc.xpt +0 -0
  259. data/samples/navi/components/xulrunner.xpt +0 -0
  260. data/samples/navi/components/xultmpl.xpt +0 -0
  261. data/samples/navi/components/xulutil.dll +0 -0
  262. data/samples/navi/controlsNaviMask.png +0 -0
  263. data/samples/navi/greprefs/all.js +1344 -0
  264. data/samples/navi/greprefs/security-prefs.js +69 -0
  265. data/samples/navi/greprefs/xpinstall.js +2 -0
  266. data/samples/navi/navi_demo.rb +207 -0
  267. data/samples/navi/plugins/NPSWF32.dll +0 -0
  268. data/samples/navi/plugins/flashplayer.xpt +0 -0
  269. data/samples/navi/plugins/npnul32.dll +0 -0
  270. data/samples/navi/plugins.cfg +10 -0
  271. data/samples/navi/res/EditorOverride.css +359 -0
  272. data/samples/navi/res/Thumbs.db +0 -0
  273. data/samples/navi/res/arrow.gif +0 -0
  274. data/samples/navi/res/arrowd.gif +0 -0
  275. data/samples/navi/res/bloatcycle.html +40 -0
  276. data/samples/navi/res/broken-image.gif +0 -0
  277. data/samples/navi/res/charsetData.properties +199 -0
  278. data/samples/navi/res/charsetalias.properties +517 -0
  279. data/samples/navi/res/cmessage.txt +1 -0
  280. data/samples/navi/res/dtd/xhtml11.dtd +300 -0
  281. data/samples/navi/res/entityTables/html40Latin1.properties +146 -0
  282. data/samples/navi/res/entityTables/html40Special.properties +69 -0
  283. data/samples/navi/res/entityTables/html40Symbols.properties +164 -0
  284. data/samples/navi/res/entityTables/htmlEntityVersions.properties +50 -0
  285. data/samples/navi/res/entityTables/transliterate.properties +2367 -0
  286. data/samples/navi/res/fonts/fontEncoding.properties +127 -0
  287. data/samples/navi/res/fonts/fontNameMap.properties +134 -0
  288. data/samples/navi/res/forms.css +531 -0
  289. data/samples/navi/res/grabber.gif +0 -0
  290. data/samples/navi/res/hiddenWindow.html +1 -0
  291. data/samples/navi/res/html/Thumbs.db +0 -0
  292. data/samples/navi/res/html/gopher-audio.gif +0 -0
  293. data/samples/navi/res/html/gopher-binary.gif +0 -0
  294. data/samples/navi/res/html/gopher-find.gif +0 -0
  295. data/samples/navi/res/html/gopher-image.gif +0 -0
  296. data/samples/navi/res/html/gopher-menu.gif +0 -0
  297. data/samples/navi/res/html/gopher-movie.gif +0 -0
  298. data/samples/navi/res/html/gopher-sound.gif +0 -0
  299. data/samples/navi/res/html/gopher-telnet.gif +0 -0
  300. data/samples/navi/res/html/gopher-text.gif +0 -0
  301. data/samples/navi/res/html/gopher-unknown.gif +0 -0
  302. data/samples/navi/res/html.css +478 -0
  303. data/samples/navi/res/langGroups.properties +236 -0
  304. data/samples/navi/res/language.properties +259 -0
  305. data/samples/navi/res/loading-image.gif +0 -0
  306. data/samples/navi/res/quirk.css +282 -0
  307. data/samples/navi/res/samples/Anieyes.gif +0 -0
  308. data/samples/navi/res/samples/Thumbs.db +0 -0
  309. data/samples/navi/res/samples/aform.css +69 -0
  310. data/samples/navi/res/samples/beeptest.html +18 -0
  311. data/samples/navi/res/samples/bform.css +45 -0
  312. data/samples/navi/res/samples/bg.jpg +0 -0
  313. data/samples/navi/res/samples/cform.css +40 -0
  314. data/samples/navi/res/samples/checkboxTest.xul +47 -0
  315. data/samples/navi/res/samples/demoform.css +97 -0
  316. data/samples/navi/res/samples/find.html +97 -0
  317. data/samples/navi/res/samples/gear1.gif +0 -0
  318. data/samples/navi/res/samples/image_props.html +58 -0
  319. data/samples/navi/res/samples/mozform.css +256 -0
  320. data/samples/navi/res/samples/printsetup.html +175 -0
  321. data/samples/navi/res/samples/raptor.jpg +0 -0
  322. data/samples/navi/res/samples/rock_gra.gif +0 -0
  323. data/samples/navi/res/samples/scrollbarTest1.xul +66 -0
  324. data/samples/navi/res/samples/scrollbarTest2.xul +19 -0
  325. data/samples/navi/res/samples/sliderTest1.xul +14 -0
  326. data/samples/navi/res/samples/soundtest.html +20 -0
  327. data/samples/navi/res/samples/test.wav +0 -0
  328. data/samples/navi/res/samples/test0.html +220 -0
  329. data/samples/navi/res/samples/test1.html +84 -0
  330. data/samples/navi/res/samples/test10.html +16 -0
  331. data/samples/navi/res/samples/test11.html +42 -0
  332. data/samples/navi/res/samples/test12.html +79 -0
  333. data/samples/navi/res/samples/test13.html +126 -0
  334. data/samples/navi/res/samples/test14.html +5 -0
  335. data/samples/navi/res/samples/test15.html +5 -0
  336. data/samples/navi/res/samples/test16.html +124 -0
  337. data/samples/navi/res/samples/test2.html +41 -0
  338. data/samples/navi/res/samples/test3.html +126 -0
  339. data/samples/navi/res/samples/test4.html +335 -0
  340. data/samples/navi/res/samples/test5.html +199 -0
  341. data/samples/navi/res/samples/test6.html +335 -0
  342. data/samples/navi/res/samples/test7.html +11 -0
  343. data/samples/navi/res/samples/test8-1.html +66 -0
  344. data/samples/navi/res/samples/test8.html +662 -0
  345. data/samples/navi/res/samples/test8dom.html +64 -0
  346. data/samples/navi/res/samples/test8sca.html +308 -0
  347. data/samples/navi/res/samples/test8siz.html +224 -0
  348. data/samples/navi/res/samples/test8tab.html +9 -0
  349. data/samples/navi/res/samples/test9.html +12 -0
  350. data/samples/navi/res/samples/test9a.html +39 -0
  351. data/samples/navi/res/samples/test9b.html +16 -0
  352. data/samples/navi/res/samples/test_ed.html +5 -0
  353. data/samples/navi/res/samples/test_form.html +34 -0
  354. data/samples/navi/res/samples/test_gfx.html +75 -0
  355. data/samples/navi/res/samples/test_lbox.html +100 -0
  356. data/samples/navi/res/samples/test_pr.html +87 -0
  357. data/samples/navi/res/samples/test_weight.html +45 -0
  358. data/samples/navi/res/samples/toolbarTest1.xul +51 -0
  359. data/samples/navi/res/samples/treeTest1.css +62 -0
  360. data/samples/navi/res/samples/treeTest1.xul +110 -0
  361. data/samples/navi/res/samples/xulTest.css +130 -0
  362. data/samples/navi/res/svg.css +64 -0
  363. data/samples/navi/res/table-add-column-after-active.gif +0 -0
  364. data/samples/navi/res/table-add-column-after-hover.gif +0 -0
  365. data/samples/navi/res/table-add-column-after.gif +0 -0
  366. data/samples/navi/res/table-add-column-before-active.gif +0 -0
  367. data/samples/navi/res/table-add-column-before-hover.gif +0 -0
  368. data/samples/navi/res/table-add-column-before.gif +0 -0
  369. data/samples/navi/res/table-add-row-after-active.gif +0 -0
  370. data/samples/navi/res/table-add-row-after-hover.gif +0 -0
  371. data/samples/navi/res/table-add-row-after.gif +0 -0
  372. data/samples/navi/res/table-add-row-before-active.gif +0 -0
  373. data/samples/navi/res/table-add-row-before-hover.gif +0 -0
  374. data/samples/navi/res/table-add-row-before.gif +0 -0
  375. data/samples/navi/res/table-remove-column-active.gif +0 -0
  376. data/samples/navi/res/table-remove-column-hover.gif +0 -0
  377. data/samples/navi/res/table-remove-column.gif +0 -0
  378. data/samples/navi/res/table-remove-row-active.gif +0 -0
  379. data/samples/navi/res/table-remove-row-hover.gif +0 -0
  380. data/samples/navi/res/table-remove-row.gif +0 -0
  381. data/samples/navi/res/throbber/Thumbs.db +0 -0
  382. data/samples/navi/res/throbber/anim.gif +0 -0
  383. data/samples/navi/res/throbber/anims00.gif +0 -0
  384. data/samples/navi/res/throbber/anims01.gif +0 -0
  385. data/samples/navi/res/throbber/anims02.gif +0 -0
  386. data/samples/navi/res/throbber/anims03.gif +0 -0
  387. data/samples/navi/res/throbber/anims04.gif +0 -0
  388. data/samples/navi/res/throbber/anims05.gif +0 -0
  389. data/samples/navi/res/throbber/anims06.gif +0 -0
  390. data/samples/navi/res/throbber/anims07.gif +0 -0
  391. data/samples/navi/res/throbber/anims08.gif +0 -0
  392. data/samples/navi/res/throbber/anims09.gif +0 -0
  393. data/samples/navi/res/throbber/anims10.gif +0 -0
  394. data/samples/navi/res/throbber/anims11.gif +0 -0
  395. data/samples/navi/res/throbber/anims12.gif +0 -0
  396. data/samples/navi/res/throbber/anims13.gif +0 -0
  397. data/samples/navi/res/throbber/anims14.gif +0 -0
  398. data/samples/navi/res/throbber/anims15.gif +0 -0
  399. data/samples/navi/res/throbber/anims16.gif +0 -0
  400. data/samples/navi/res/throbber/anims17.gif +0 -0
  401. data/samples/navi/res/throbber/anims18.gif +0 -0
  402. data/samples/navi/res/throbber/anims19.gif +0 -0
  403. data/samples/navi/res/throbber/anims20.gif +0 -0
  404. data/samples/navi/res/throbber/anims21.gif +0 -0
  405. data/samples/navi/res/throbber/anims22.gif +0 -0
  406. data/samples/navi/res/throbber/anims23.gif +0 -0
  407. data/samples/navi/res/throbber/anims24.gif +0 -0
  408. data/samples/navi/res/throbber/anims25.gif +0 -0
  409. data/samples/navi/res/throbber/anims26.gif +0 -0
  410. data/samples/navi/res/throbber/anims27.gif +0 -0
  411. data/samples/navi/res/throbber/anims28.gif +0 -0
  412. data/samples/navi/res/throbber/anims29.gif +0 -0
  413. data/samples/navi/res/ua.css +235 -0
  414. data/samples/navi/res/viewer.properties +1 -0
  415. data/samples/navi/res/viewsource.css +118 -0
  416. data/samples/navi/res/wincharset.properties +55 -0
  417. data/samples/navi/resources.cfg +14 -0
  418. data/samples/navi/testNaviMask.png +0 -0
  419. data/samples/ogre.cfg +8 -0
  420. data/samples/plugins.cfg +11 -0
  421. data/samples/quake3settings.cfg +2 -0
  422. data/samples/render_run_log.5796 +891 -0
  423. data/samples/render_to_texture.rb +161 -0
  424. data/samples/resources.cfg +16 -0
  425. data/samples/sky_box.rb +107 -0
  426. data/samples/sky_dome.rb +86 -0
  427. data/samples/sky_plane.rb +27 -0
  428. data/samples/smoke.rb +23 -0
  429. data/samples/work/cube_mapping.rb +686 -0
  430. metadata +500 -0
data/README ADDED
@@ -0,0 +1,79 @@
1
+ = Ogre.rb : Ruby wrapper around Ogre
2
+
3
+ Welcome to Ogre.rb, the Ruby wrapper around the Ogre rendering engine. This currently is only
4
+ known to build and run correctly on Linux, though I expect this will work just fine on Mac as well.
5
+ Windows support will come later.
6
+
7
+ Ogre.rb is currently built for Ruby 1.8.5+ and Ogre 1.4.x (Eihort)
8
+
9
+ == Usage
10
+
11
+ Assuming Ogre.rb and OIS.rb are compiled, you are free to copy lib/ogre.so and lib/OIS.so into your project
12
+ as needed. You will need to either place the extensions next to the Ogre and OIS libraries or have your
13
+ environment set up to know where these libraries are located. Then, using Ogre.rb is as easy as:
14
+
15
+ require 'ogre'
16
+ require 'ruby_ois'
17
+
18
+ and optionally
19
+
20
+ require 'navi' (note that navi is only supported in Windows using Direct3D at the moment)
21
+
22
+ The samples/ directory is a direct port of the Ogre sample programs.
23
+
24
+ == Contributing
25
+
26
+ Please post patches, feature requests, bug fixes to the rubyforge website at http://rubyforge.org/projects/ogrerb.
27
+ As I'm not sure exactly how to unit test such a wrapper, it will be greatly appreciated if changes are proven as
28
+ part of a sample application.
29
+
30
+ == Build Requirements
31
+
32
+ * rake
33
+ * Ogre 1.4.x (Eihort)
34
+ * OIS
35
+ * swig 1.3.31+ (uses -autorename)
36
+ * pkg-config (Linux)
37
+
38
+ == Build Steps
39
+
40
+ === Linux
41
+
42
+ rake build_all
43
+
44
+ The resulting files can be found in ogrerb/lib.
45
+
46
+ === Mac
47
+
48
+ TODO
49
+
50
+ === Windows
51
+
52
+ ==== Setup your environment
53
+
54
+ 1. Install Ruby One-Click Installer: http://rubyforge.org/projects/rubyinstaller/
55
+ 1. Install Visual Studio Express 2005: http://msdn.microsoft.com/vstudio/express/ (Be sure to register environment variables)
56
+ 1. You'll need to remove the following 3 lines of the [ruby install dir]/lib/ruby/1.8/i386-mswin32/config.h file:
57
+ #if _MSC_VER != 1200
58
+ #error MSC version unmatch
59
+ #endif
60
+ 1. You need the MS platform SDK available here(ish): http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en.
61
+ 1. Be sure to register environment variables in the setup.
62
+ 1. Download and install the Ogre SDK and the precompiled VC dependencies: http://www.ogre3d.org
63
+ 1. Set the environment variable OGRE_HOME to where the the Ogre SDK is installed
64
+ 1. Open "Visual Studio 2005 Command Prompt" and navigate to where you have Ogre.rb checked out and run the following rake tasks
65
+
66
+ ==== Build
67
+
68
+ 1. rake ogre:swig
69
+ 1. rake ogre:compile
70
+ 1. rake ois:swig
71
+ 1. rake ois:compile
72
+
73
+ You cannot run rake ogre:build or ois:build due to a Windows file permission problem.
74
+
75
+ The resulting files can be found in ogrerb/lib.
76
+
77
+ == Running Ogre.rb programs
78
+
79
+ You'll either have to copy the OgreMain dll to the ogrerb/lib folder, or you'll need to set the PATH (on Windows) or LD_LIBRARY_PATH (on Linux) environment variable to point to where this file is ([OgreSDK]/bin/release for prebuilt). Then, it's simply <code>require 'ogre'</code> and off you go.
data/Rakefile ADDED
@@ -0,0 +1,288 @@
1
+ require 'rake/testtask'
2
+ require 'rake/rdoctask'
3
+ require 'rake/contrib/sshpublisher'
4
+ require 'rake/gempackagetask'
5
+
6
+ require 'platform'
7
+
8
+ task :default => :build_all
9
+
10
+ OGRE_RB_VERSION = "0.1"
11
+
12
+ ###########################
13
+ # Project Managment tasks #
14
+ ###########################
15
+
16
+ RDOC_INCLUDES = %w(
17
+ README
18
+ doc_src/**/*.rb
19
+ lib/application.rb
20
+ lib/application_frame_listener.rb
21
+ lib/application_loading_bar.rb
22
+ lib/constants.rb
23
+ lib/method_fixes.rb
24
+ )
25
+
26
+ RDOC_OPTIONS = ['-S', '-t Ogre.rb Documentation']
27
+
28
+ Rake::RDocTask.new do |t|
29
+ t.main = "README"
30
+ t.rdoc_files.include(RDOC_INCLUDES)
31
+ t.options += RDOC_OPTIONS
32
+ end
33
+
34
+ RUBYFORGE_USERNAME = "jameskilton"
35
+ PROJECT_WEB_PATH = "/var/www/gforge-projects/ogrerb"
36
+
37
+ desc "Update the website"
38
+ task :upload_web => :rdoc do |t|
39
+ unless File.directory?("publish")
40
+ mkdir "publish"
41
+ mkdir "publish/docs"
42
+ end
43
+ sh "svn export --force website publish/"
44
+ sh "cp -r html/* publish/docs/"
45
+ Rake::SshDirPublisher.new("#{RUBYFORGE_USERNAME}@rubyforge.org", PROJECT_WEB_PATH, "publish").upload
46
+ rm_rf "publish"
47
+ end
48
+
49
+ ## Gem Compilation ##
50
+ ogre_rb_spec = Gem::Specification.new do |s|
51
+
52
+ s.platform = Gem::Platform::CURRENT
53
+
54
+ lib_files = ""
55
+ if Platform.windows?
56
+ lib_files = %w(lib/ogre.dll lib/ruby_ois.dll)
57
+ elsif Platform.mac?
58
+ else # Posix environment
59
+ lib_files = %w(lib/ogre.so lib/ruby_ois.so)
60
+ end
61
+
62
+ s.name = 'ogre.rb'
63
+ s.version = OGRE_RB_VERSION
64
+ s.summary = "Ruby wrapper for Ogre 3D"
65
+ s.description = %q{Ogre.rb is a SWIG wrapper to allow access to the Ogre 3D API from Ruby.}
66
+
67
+ s.author = "Jason Roelofs"
68
+ s.email = "jameskilton@gmail.com"
69
+ s.rubyforge_project = 'ogrerb'
70
+ s.homepage = 'http://ogrerb.rubyforge.org'
71
+
72
+ s.require_path = '.'
73
+
74
+ s.required_ruby_version = '>= 1.8.4'
75
+
76
+ # Inform of the need to have Ogre installed and OGRE_HOME set
77
+ s.requirements << "Ogre Einhort (1.4)"
78
+ s.requirements << "Environment variable OGRE_HOME set"
79
+
80
+ #s.has_rdoc = false
81
+ #s.extra_rdoc_files += RDOC_INCLUDES
82
+ #s.rdoc_options += RDOC_OPTIONS
83
+
84
+ files = FileList.new %W[
85
+ README
86
+ platform.rb
87
+ ogre.rb
88
+ Rakefile
89
+ lib/*.rb
90
+ samples/**/*
91
+ doc_src/**/*
92
+ ]
93
+ files += lib_files
94
+
95
+ s.files = files
96
+ end
97
+
98
+ desc 'Package as gem & zip'
99
+ Rake::GemPackageTask.new(ogre_rb_spec) do |p|
100
+ p.gem_spec = ogre_rb_spec
101
+ #p.need_tar = true
102
+ #p.need_zip = true
103
+ end
104
+
105
+ #############################
106
+ # Project compilation tasks #
107
+ #############################
108
+
109
+ desc "Rebuild the OGRE and OIS wrappers"
110
+ task :build_all => ["ogre:build", "ois:build"]
111
+
112
+ desc "Clean everything"
113
+ task :clean_all => ["ogre:clean", "ois:clean"]
114
+
115
+ namespace :ois do
116
+ desc "Rebuild all of the OIS wrapper"
117
+ task :build => [:swig, :compile]
118
+
119
+ desc "Run swig on the interface files"
120
+ task :swig do
121
+ includes = %w(-I./src_headers/OIS -I./src_headers/wrappers)
122
+ sh "swig -ruby -minherit -c++ -autorename #{includes.join(' ')} -o build/ois/ois_wrap.cpp ois/ois.i"
123
+ if Platform.windows?
124
+ insert_headers("build/ois/ois_wrap.cpp") do
125
+ <<-EOF
126
+ #include "OIS.h"
127
+ EOF
128
+ end
129
+ end
130
+ end
131
+
132
+ desc "Compile the extension and move the resulting library into lib/"
133
+ task :compile do
134
+ resulting_file = "ruby_ois.so"
135
+ build_file = resulting_file
136
+ cd "build/ois" do
137
+ ruby "extconf.rb"
138
+ if Platform.linux?
139
+ sh "make all"
140
+ elsif Platform.windows?
141
+ sh "nmake"
142
+ # Create our manifest (see http://www.codeproject.com/cpp/vcredists_x86.asp)
143
+ sh "mt.exe /manifest #{resulting_file}.manifest /outputresource:#{resulting_file};#2"
144
+ resulting_file = "ruby_ois.dll"
145
+ build_file = "ruby_ois.so"
146
+ else
147
+ raise "Error: Unsupported platform " + PLATFORM
148
+ end
149
+ cp build_file, File.join("..", "..", "lib", resulting_file)
150
+ end
151
+ end
152
+
153
+ desc "Clean up the build environment"
154
+ task :clean do
155
+ cd "build/ois" do
156
+ ruby "extconf.rb"
157
+ sh "make clean"
158
+ rm "mkmf.log" rescue nil
159
+ end
160
+ end
161
+ end
162
+
163
+ namespace :ogre do
164
+
165
+ desc "Rebuild all of ogre.rb"
166
+ task :build => [:swig, :compile]
167
+
168
+ desc "Run swig on the interface files"
169
+ task :swig do
170
+ includes = %w(-I./src_headers/OGRE -I./src_headers/ExampleApplication -I./src_headers/wrappers -I./src_headers/OIS)
171
+ sh "swig -ruby -minherit -c++ -autorename #{includes.join(' ')} -o build/ogre/ogre_rb_wrap.cpp ogre/ogre_rb.i"
172
+ if Platform.windows?
173
+ # compensate for windows stl. Uses wrong version when ruby is first.
174
+ insert_headers("build/ogre/ogre_rb_wrap.cpp") do
175
+ <<-EOF
176
+ #include "Ogre.h"
177
+ #{Platform.windows? ? "#include <winsock.h>" : ""}
178
+ EOF
179
+ end
180
+ end
181
+ end
182
+
183
+ desc "Compile the extension and move the resulting library into lib/"
184
+ task :compile do
185
+ resulting_file = "ogre.so"
186
+ cd "build/ogre" do
187
+ ruby "extconf.rb"
188
+ if Platform.linux?
189
+ sh "make clean all"
190
+ elsif Platform.windows?
191
+ sh "nmake"
192
+ # Create our manifest (see http://www.codeproject.com/cpp/vcredists_x86.asp)
193
+ sh "mt.exe /manifest ogre.so.manifest /outputresource:ogre.so;#2"
194
+ resulting_file = "ogre.dll"
195
+ else
196
+ raise "Error: Unsupported platform " + PLATFORM
197
+ end
198
+ cp "ogre.so", File.join("..", "..", "lib", resulting_file)
199
+ end
200
+ end
201
+
202
+ desc "Clean up the build environment"
203
+ task :clean do
204
+ cd "build/ogre" do
205
+ ruby "extconf.rb"
206
+ sh "make clean"
207
+ rm "mkmf.log" rescue nil
208
+ end
209
+ end
210
+
211
+ desc "Copy over the ogre header files from an ogre installation. Expects OGRE_HOME to be set."
212
+ task :update_headers do
213
+ raise "Unable to find Ogre headers, please set OGRE_HOME to the distribution path" if ENV['OGRE_HOME'].nil?
214
+
215
+ File.cp_r "#{ENV['OGRE_HOME']}/include/OGRE/", "#{File.dirname(__FILE__)}/src_headers"
216
+ end
217
+
218
+ desc "Create default interface files for each of the ogre headers"
219
+ task :create_interfaces do
220
+ headers_match = File.join("src_headers", "OGRE", "Ogre*.h")
221
+ ogre_headers = Dir[headers_match]
222
+
223
+ ogre_headers.each do |header|
224
+ filename = File.basename(header, ".h")
225
+ interface_file_name = File.join("ogre", File.basename(header, ".h") + ".i")
226
+ raise "Interface file for #{filename} already exists" if File.exists?(interface_file_name)
227
+
228
+ File.open(interface_file_name, "w+") do |file|
229
+ file.write <<END
230
+ %{
231
+ #include "#{filename}.h"
232
+ %}
233
+
234
+ %include "#{filename}.h"
235
+ END
236
+ end
237
+ end
238
+ end
239
+ end
240
+
241
+
242
+ namespace :navi do
243
+
244
+ desc "Rebuild all of navi.rb"
245
+ task :build => [:swig, :compile]
246
+
247
+ desc "Run swig on the interface files"
248
+ task :swig do
249
+ includes = %w(-I./src_headers/navi -I./src_headers/wrappers)
250
+ sh "swig -autorename -ruby -minherit -c++ #{includes.join(' ')} -o build/navi/navi_rb_wrap.cpp navi/navi_rb.i"
251
+ if Platform.windows?
252
+ # compensate for windows stl. Uses wrong version when ruby is first.
253
+
254
+ insert_headers("build/navi/navi_rb_wrap.cpp") do
255
+ <<-EOF
256
+ #include "Ogre.h"
257
+ #{Platform.windows? ? "#include <winsock.h>" : ""}
258
+ EOF
259
+ end
260
+ end
261
+ end
262
+
263
+ desc "Compile the extension and move the resulting library into lib/"
264
+ task :compile do
265
+ resulting_file = "navi.dll"
266
+ cd "build/navi" do
267
+ ruby "extconf.rb"
268
+ if Platform.windows?
269
+ sh "nmake"
270
+ # Create our manifest (see http://www.codeproject.com/cpp/vcredists_x86.asp)
271
+ sh "mt.exe /manifest navi.so.manifest /outputresource:navi.so;#2"
272
+ else
273
+ raise "Error: Unsupported platform " + PLATFORM
274
+ end
275
+ cp "navi.so", File.join("..", "..", "lib", resulting_file)
276
+ end
277
+ end
278
+
279
+ desc "Clean up the build environment"
280
+ task :clean do
281
+ cd "build" do
282
+ ruby "extconf.rb"
283
+ sh "make clean"
284
+ rm "mkmf.log" rescue nil
285
+ end
286
+ end
287
+
288
+ end
data/doc_src/ogre.rb ADDED
@@ -0,0 +1,246 @@
1
+ #
2
+ # = Naming Conventions
3
+ #
4
+ # Ogre.rb is using the <tt>--autorename</tt> flag available in SWIG-Ruby. This automatically
5
+ # renames constants, methods, and attributes to follow the Ruby Way. Mainly, this means that
6
+ # method names are the same as Ogre's, but follow this style:
7
+ #
8
+ # ClassName.method_name(param1, param2, ...)
9
+ # var.method_name? # for methods who return boolean results
10
+ #
11
+ # Because there are setter methods in Ogre that can take multiple parameters
12
+ # (e.g. SceneManager::setSkyBox), we've decided to not turn set/get methods into the typical
13
+ # attr_accessor names of Ruby. So, this method would be used in Ogre.rb as such:
14
+ #
15
+ # scene_manager.set_sky_box(true, "CloudySky")
16
+ #
17
+ # This documentation will try to cover every method rename that differs from straight undercasing of Ogre method names,
18
+ # though please post a patch if some are missed.
19
+ #
20
+ module Ogre
21
+ # This class is here to define a few things that were difficult / not
22
+ # working correctly just through SWIG. These methods are defined so as not to be any different
23
+ # from calling the constants straight from Ogre (Vector3.ZERO).
24
+ #
25
+ # See OgreVector3.i for an example, but basically we need to define these manually
26
+ # because Ruby always passes references, which causes annoying problems such as:
27
+ #
28
+ # vec1 = Ogre::Vector3.ZERO
29
+ # vec1.x = 10
30
+ # vec2 = Ogre::Vector3.ZERO
31
+ # vec2.x #=> 10 (when it should be 0)
32
+ #
33
+ # Current classes with constants redefined as methods in lib/constants.rb:
34
+ #
35
+ # Vector3
36
+ # Vector4
37
+ # Quaternion
38
+ #
39
+ module Constants
40
+ end
41
+
42
+ class FrameEvent
43
+ # Function wrapper for the timeSinceLastFrame variable
44
+ def time_since_last_frame
45
+ end
46
+
47
+ # Function wrapper for the timeSinceLastEvent variable
48
+ def time_since_last_event
49
+ end
50
+ end
51
+
52
+ # As it stands, all classes with internal Listener classes (aka Resource) have been neutered to not
53
+ # allow access to these inner classes. As Ruby is perfectly fine with inner classes, this may need
54
+ # to be a change to the ruby SWIG driver. So for now, these classes and the related functions
55
+ # are unavailable through Ogre.rb.
56
+ class Listeners
57
+ end
58
+
59
+ # MovableObject is used extensively in Ogre, but very rarely is an instance of the class created through
60
+ # the typical "new MovableObject();" syntax. Given this, there is no immedate way of knowing what subclass
61
+ # of MovableObject was actually created, in say, Ogre::SceneManager::createMovableObject:
62
+ #
63
+ # virtual MovableObject* createMovableObject(const String& name, const String& typeName, const NameValuePairList* params = 0);
64
+ #
65
+ # Left alone, every call to this function will return a MovableObject instance instead of the appropriate
66
+ # subclass, completely destroying expected type information. Thankfully Ogre makes this very easy to
67
+ # solve: getMovableType. Every MovableObject has this method which returns the string representation
68
+ # of the class name it is. Using this string, we can find out what class was actually created and have
69
+ # SWIG generate the appropriate class type. Thus, we can do the following:
70
+ #
71
+ # trail = scene_manager.create_movable_object("RibbonTrail1", "RibbonTrail", {"numberOfChains" => "2", "maxElements" => "80"})
72
+ # trail.set_material_name("LightRibbonTrail")
73
+ # trail.set_trail_length(400)
74
+ #
75
+ # As <tt>trail</tt> is a <tt>#<Ogre::RibbonTrail:0xb6edf718></tt>.
76
+ #
77
+ class MovableObject
78
+ end
79
+
80
+ # Any method call that takes an Ogre::NameValuePairList argument should be given a normal Ruby
81
+ # hash of "key" => "value". Example usage is found in the sample lighting.rb.
82
+ #
83
+ # Ogre's SceneManager::createMovableObject is defined as:
84
+ #
85
+ # virtual MovableObject* createMovableObject(const String& name, const String& typeName, const NameValuePairList* params = 0);
86
+ #
87
+ # and can be used in Ogre.rb as:
88
+ #
89
+ # trail = scene_manager.create_movable_object("RibbonTrail1", "RibbonTrail", {"numberOfChains" => "2", "maxElements" => "80"})
90
+ #
91
+ class NameValuePairList
92
+ end
93
+
94
+ class RenderWindow
95
+ # Renamed: isClosed
96
+ def closed?
97
+ end
98
+ end
99
+
100
+ class Singleton
101
+ # Renamed: getSingleton
102
+ #
103
+ # In following the Ruby-way, singletons are to be accessed as such:
104
+ #
105
+ # MeshManager.instance.create_mesh
106
+ #
107
+ def self.instance
108
+ end
109
+ end
110
+
111
+ class SceneManager
112
+ # Renamed: getRootSceneNode
113
+ def root_scene_node
114
+ end
115
+ end
116
+
117
+ class TextureManager
118
+ # There is currently an issue with create_manual in that if you try to use the
119
+ # method version that does not include the depth parameter (such as in Ogre's
120
+ # RenderToTexture demo), SWIG still chooses this
121
+ # one, sending in the render_type parameter as the pixel_format. If you run into an unexpected
122
+ # assert failure in PixelFormat, make sure that you're method call
123
+ # signature matches this method's parameter list.
124
+ #
125
+ # num_mip_maps can be -1 to use the system's default number of mip maps
126
+ #
127
+ # depth must be >= 1 or the method will never return
128
+ #
129
+ # Ogre's docs for this class are here: http://www.ogre3d.org/docs/api/html/classOgre_1_1TextureManager.html
130
+ def create_manual(name, group_name, tex_type, width, height, depth, num_mip_maps, pixel_format, render_type, manual_loader = nil)
131
+ end
132
+ end
133
+
134
+ # There is a problem, possibly unsolvable, with trying to send Ruby subclasses of C++ classes
135
+ # back into C++ methods. This came up in situations like registering a custom FrameListener.
136
+ # It basically doesn't work, and ends up causing all sorts of issues from random SegFaults at
137
+ # runtime to ObjectPreviouslyDeleted errors at the method's invocation. To get around this
138
+ # problem, these proxy classes have been defined. They are simple C++ subclasses that take
139
+ # care of whatever registering needs to happen inside of their constructor.
140
+ #
141
+ # Also please note: <b>This Proxies namespace does not exist in Ogre.rb</b>. The classes are grouped
142
+ # this way for documentation purposes.
143
+ module Proxies
144
+ # FrameListenerProxy constructor takes the Root object, with which it registers itself as a system
145
+ # frame listener.
146
+ class FrameListenerProxy
147
+ def initialize(root)
148
+ end
149
+ end
150
+
151
+ # This proxy isn't quite done yet, as it's registering command,
152
+ # WindowEventUtilities::addWindowEventListener, takes both the Listener and a RenderWindow.
153
+ # It's the RenderWindow that is causing problems but I think this one is easily solvable.
154
+ class WindowEventListenerProxy
155
+ def initialize(render_window)
156
+ end
157
+ end
158
+ end
159
+
160
+ # Hardware buffers are an especially interesting problem when it comes to duplicating functionality in Ruby.
161
+ # Buffers like Vertex and Index buffers are meant to be directly accessible and in a contiguous memory location.
162
+ # This allows the Ogre C++ code to populate these buffers as such
163
+ #
164
+ # // position
165
+ # *pReal++ = -vec.x;
166
+ # *pReal++ = GRASS_HEIGHT;
167
+ # *pReal++ = -vec.z;
168
+ # // normal
169
+ # *pReal++ = 0;
170
+ # *pReal++ = 1;
171
+ # *pReal++ = 0;
172
+ # // uv
173
+ # *pReal++ = 0;
174
+ # *pReal++ = 0;
175
+ #
176
+ # Now we obviously can't do this in Ruby, so Vertex and Index Buffer proxy classes have been put together to
177
+ # allow the above code to become this following in Ruby
178
+ #
179
+ # x = i * 32
180
+ # # Position
181
+ # reals[x + 0] = -vec.x
182
+ # reals[x + 1] = GRASS_HEIGHT
183
+ # reals[x + 2] = -vec.z
184
+ # # Normal
185
+ # reals[x + 3] = 0
186
+ # reals[x + 4] = 1
187
+ # reals[x + 5] = 0
188
+ # # UV
189
+ # reals[x + 6] = 0
190
+ # reals[x + 7] = 0
191
+ #
192
+ # Compare the Ogre Grass demo with the Ogre.rb Grass demo to see the full code
193
+ class HardwareBuffer
194
+ end
195
+
196
+ # See HardwareBuffer
197
+ class HardwareVertexBuffer < HardwareBuffer
198
+ # For now this should be the only lock method used. It returns a VertexBufferProxy which
199
+ # allows the array-like access
200
+ def lock(lock_options)
201
+ end
202
+ end
203
+
204
+ # See HardwareBuffer
205
+ class HardwareIndexBuffer < HardwareBuffer
206
+ # For now this should be the only lock method used. It returns an IndexBufferProxy which
207
+ # allows the array-like access
208
+ def lock(lock_options)
209
+ end
210
+ end
211
+
212
+
213
+ # The StaticGeometry class contains a lot of nested classes to deal with all of the parts that could possible
214
+ # be in a piece of static geometry. This of course poses a serious problem with wrapping as SWIG cannot handle
215
+ # nested classes. The solution here is to create proxy classes for all of the nested classes and use those instead.
216
+ # The normal API of using StaticGeometry has not changed, just the names of the classes that will be dealt with.
217
+ #
218
+ # This proxy code was taken from OgreDotNet and still needs some work to make it fit nicely into the Ruby way of
219
+ # doing things. If something isn't quite right, please look at OgreStaticGeometry.i and StaticGeometryProxies.h
220
+ # to see what methods are available.
221
+ #
222
+ # See the Grass demo for example usage.
223
+ class StaticGeometry
224
+ # Proxy for the StaticGeometry::GeometryBucket class
225
+ class SGGeometryBucket
226
+ # Returns the underlying GeometryBucket class as a Renderable object
227
+ def as_renderable
228
+ end
229
+ end
230
+
231
+ # Proxy for the StaticGeometry::MaterialBucket class
232
+ class SGMaterialBucket
233
+ end
234
+
235
+ # Proxy for the StaticGeometry::LODBucket class
236
+ class SGLODBucket
237
+ end
238
+
239
+ # Proxy for the StaticGeometry::Region class
240
+ class SGRegion
241
+ # Returns the underlying Region class as a MovableObject
242
+ def as_movable_object
243
+ end
244
+ end
245
+ end
246
+ end
data/doc_src/ois.rb ADDED
@@ -0,0 +1,67 @@
1
+ # OIS has been completely wrapped into Ruby. Any of OIS's classes documented here are to describe
2
+ # special cases or functionality changes required to make this work for Ruby.
3
+ module OIS
4
+
5
+ class InputManager
6
+ # As with Ogre::MovableObject and Ogre::Resource, the usage of <tt>create_input_object</tt> will automatically
7
+ # return the proper type of OIS::Object whether it be a Mouse, Keyboard, or JoyStick.
8
+ #
9
+ # See Ogre::ApplicationFrameListener for an example of where this is used.
10
+ def create_input_object(obj_type, is_buffered)
11
+ end
12
+
13
+ # See OIS::ParamList
14
+ def create_input_system(param_list)
15
+ end
16
+ end
17
+
18
+ class Keyboard
19
+ # Renamed: isKeyDown
20
+ def key_down?(key)
21
+ end
22
+ end
23
+
24
+ class Mouse
25
+ # Renamed: getMouseState
26
+ def mouse_state
27
+ end
28
+ end
29
+
30
+ class MouseState
31
+ # Renamed: buttonDown
32
+ def button_down?(button)
33
+ end
34
+ end
35
+
36
+ # Any OIS function that uses a ParamList as a parameter type will now require a simple Ruby
37
+ # hash construct. For example, <tt>InputManager.createInputSystem</tt> is now used as such:
38
+ #
39
+ # windowHnd = @window.get_custom_attribute_unsigned_long("WINDOW")
40
+ # InputManager.create_input_system( { "WINDOW" => "#{windowHnd}" } )
41
+ #
42
+ # With <tt>create_input_system</tt>, the version that simply takes a size_t has been disabled because it
43
+ # was causing problems.
44
+ class ParamList
45
+ end
46
+
47
+ # See Ogre::Proxies for an explaination of the existance of these classes. See src_headers/wrappers/OISProxies.h.
48
+ #
49
+ # Also please note: <b>This Proxies namespace does not exist in Ogre.rb</b>. The classes are grouped this way
50
+ # for documentation purposes.
51
+ module Proxies
52
+ class KeyListenerProxy
53
+ def initialize(keyboard)
54
+ end
55
+ end
56
+
57
+ class MouseListenerProxy
58
+ def initialize(mouse)
59
+ end
60
+ end
61
+
62
+ class JoyStickListenerProxy
63
+ def initialize(joy_stick)
64
+ end
65
+ end
66
+ end
67
+ end