ogre.rb 0.1-i686-linux → 0.2-i686-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. data/README +43 -5
  2. data/Rakefile +67 -165
  3. data/lib/application.rb +2 -1
  4. data/lib/application_frame_listener.rb +17 -17
  5. data/lib/ogre.so +0 -0
  6. data/lib/ruby_ois.so +0 -0
  7. data/ogre.rb +3 -0
  8. data/samples/Ogre.log +358 -257
  9. data/samples/cel_shading.rb +85 -0
  10. data/samples/grass.rb +1 -1
  11. data/samples/media/materials/programs/CelShading.cg +63 -0
  12. data/samples/media/materials/scripts/CelShading.material +68 -0
  13. data/samples/media/materials/textures/cel_shading_diffuse.png +0 -0
  14. data/samples/media/materials/textures/cel_shading_edge.png +0 -0
  15. data/samples/media/materials/textures/cel_shading_specular.png +0 -0
  16. data/samples/ogre.cfg +1 -2
  17. data/samples/plugins.cfg +3 -2
  18. data/test/ogre.cfg +10 -0
  19. data/{samples/navi → test}/plugins.cfg +2 -4
  20. data/test/test_helper.rb +67 -0
  21. data/test/unit/constants_test.rb +66 -0
  22. data/test/unit/frame_stats_proxy_test.rb +28 -0
  23. data/test/unit/math_test.rb +20 -0
  24. data/test/unit/mesh_test.rb +15 -0
  25. data/test/unit/methods_test.rb +98 -0
  26. data/test/unit/movable_object_test.rb +19 -0
  27. data/test/unit/name_value_pair_list_test.rb +12 -0
  28. data/test/unit/overlay_element_test.rb +20 -0
  29. data/test/unit/render_target_test.rb +11 -0
  30. data/test/unit/resource_test.rb +26 -0
  31. data/test/unit/scene_manager_test.rb +21 -0
  32. metadata +25 -356
  33. data/samples/navi/Media/NaviDemo.material +0 -60
  34. data/samples/navi/Media/OgreCore.zip +0 -0
  35. data/samples/navi/Media/cerulean.jpg +0 -0
  36. data/samples/navi/Media/clouds.jpg +0 -0
  37. data/samples/navi/Media/controlsNaviMask.png +0 -0
  38. data/samples/navi/Media/grass.jpg +0 -0
  39. data/samples/navi/Media/knot.mesh +0 -0
  40. data/samples/navi/Media/testNaviMask.png +0 -0
  41. data/samples/navi/NaviLocal/Navi.js +0 -136
  42. data/samples/navi/NaviLocal/buttonBg.jpg +0 -0
  43. data/samples/navi/NaviLocal/controls.html +0 -303
  44. data/samples/navi/NaviLocal/knobBg.jpg +0 -0
  45. data/samples/navi/NaviLocal/moo.dropdownmenu.js +0 -87
  46. data/samples/navi/NaviLocal/mootools.v1.1.js +0 -6964
  47. data/samples/navi/NaviLocal/naviLogo.html +0 -32
  48. data/samples/navi/NaviLocal/naviLogo.png +0 -0
  49. data/samples/navi/NaviLocal/pageBg.jpg +0 -0
  50. data/samples/navi/NaviLocal/sliderBg.jpg +0 -0
  51. data/samples/navi/NaviLocal/test.html +0 -5
  52. data/samples/navi/NaviLocal/welcome.html +0 -36
  53. data/samples/navi/NaviLocal/welcome.png +0 -0
  54. data/samples/navi/chrome/chromelist.txt +0 -597
  55. data/samples/navi/chrome/classic.jar +0 -0
  56. data/samples/navi/chrome/classic.manifest +0 -4
  57. data/samples/navi/chrome/comm.jar +0 -0
  58. data/samples/navi/chrome/comm.manifest +0 -2
  59. data/samples/navi/chrome/en-US.jar +0 -0
  60. data/samples/navi/chrome/en-US.manifest +0 -9
  61. data/samples/navi/chrome/toolkit.jar +0 -0
  62. data/samples/navi/chrome/toolkit.manifest +0 -6
  63. data/samples/navi/components/FeedProcessor.js +0 -1825
  64. data/samples/navi/components/alerts.xpt +0 -0
  65. data/samples/navi/components/appshell.xpt +0 -0
  66. data/samples/navi/components/appstartup.xpt +0 -0
  67. data/samples/navi/components/auth.dll +0 -0
  68. data/samples/navi/components/autocomplete.xpt +0 -0
  69. data/samples/navi/components/autoconfig.dll +0 -0
  70. data/samples/navi/components/autoconfig.xpt +0 -0
  71. data/samples/navi/components/caps.xpt +0 -0
  72. data/samples/navi/components/chardet.xpt +0 -0
  73. data/samples/navi/components/chrome.xpt +0 -0
  74. data/samples/navi/components/commandhandler.xpt +0 -0
  75. data/samples/navi/components/commandlines.xpt +0 -0
  76. data/samples/navi/components/composer.xpt +0 -0
  77. data/samples/navi/components/compreg.dat +0 -1474
  78. data/samples/navi/components/content_base.xpt +0 -0
  79. data/samples/navi/components/content_html.xpt +0 -0
  80. data/samples/navi/components/content_htmldoc.xpt +0 -0
  81. data/samples/navi/components/content_xmldoc.xpt +0 -0
  82. data/samples/navi/components/content_xslt.xpt +0 -0
  83. data/samples/navi/components/content_xtf.xpt +0 -0
  84. data/samples/navi/components/directory.xpt +0 -0
  85. data/samples/navi/components/docshell_base.xpt +0 -0
  86. data/samples/navi/components/dom.xpt +0 -0
  87. data/samples/navi/components/dom_base.xpt +0 -0
  88. data/samples/navi/components/dom_canvas.xpt +0 -0
  89. data/samples/navi/components/dom_core.xpt +0 -0
  90. data/samples/navi/components/dom_css.xpt +0 -0
  91. data/samples/navi/components/dom_events.xpt +0 -0
  92. data/samples/navi/components/dom_html.xpt +0 -0
  93. data/samples/navi/components/dom_loadsave.xpt +0 -0
  94. data/samples/navi/components/dom_range.xpt +0 -0
  95. data/samples/navi/components/dom_sidebar.xpt +0 -0
  96. data/samples/navi/components/dom_storage.xpt +0 -0
  97. data/samples/navi/components/dom_stylesheets.xpt +0 -0
  98. data/samples/navi/components/dom_svg.xpt +0 -0
  99. data/samples/navi/components/dom_traversal.xpt +0 -0
  100. data/samples/navi/components/dom_views.xpt +0 -0
  101. data/samples/navi/components/dom_xbl.xpt +0 -0
  102. data/samples/navi/components/dom_xpath.xpt +0 -0
  103. data/samples/navi/components/dom_xul.xpt +0 -0
  104. data/samples/navi/components/downloads.xpt +0 -0
  105. data/samples/navi/components/editor.xpt +0 -0
  106. data/samples/navi/components/embed_base.xpt +0 -0
  107. data/samples/navi/components/extensions.xpt +0 -0
  108. data/samples/navi/components/exthandler.xpt +0 -0
  109. data/samples/navi/components/fastfind.xpt +0 -0
  110. data/samples/navi/components/feeds.xpt +0 -0
  111. data/samples/navi/components/find.xpt +0 -0
  112. data/samples/navi/components/gfx.xpt +0 -0
  113. data/samples/navi/components/gksvgrenderer.xpt +0 -0
  114. data/samples/navi/components/history.xpt +0 -0
  115. data/samples/navi/components/htmlparser.xpt +0 -0
  116. data/samples/navi/components/imglib2.xpt +0 -0
  117. data/samples/navi/components/inspector.xpt +0 -0
  118. data/samples/navi/components/intl.xpt +0 -0
  119. data/samples/navi/components/intlcmpt.xpt +0 -0
  120. data/samples/navi/components/jar.xpt +0 -0
  121. data/samples/navi/components/jsconsole-clhandler.js +0 -170
  122. data/samples/navi/components/jsconsole.xpt +0 -0
  123. data/samples/navi/components/jsdservice.xpt +0 -0
  124. data/samples/navi/components/layout_base.xpt +0 -0
  125. data/samples/navi/components/layout_printing.xpt +0 -0
  126. data/samples/navi/components/layout_xul.xpt +0 -0
  127. data/samples/navi/components/layout_xul_tree.xpt +0 -0
  128. data/samples/navi/components/locale.xpt +0 -0
  129. data/samples/navi/components/lwbrk.xpt +0 -0
  130. data/samples/navi/components/mimetype.xpt +0 -0
  131. data/samples/navi/components/mozbrwsr.xpt +0 -0
  132. data/samples/navi/components/mozfind.xpt +0 -0
  133. data/samples/navi/components/necko.xpt +0 -0
  134. data/samples/navi/components/necko_about.xpt +0 -0
  135. data/samples/navi/components/necko_cache.xpt +0 -0
  136. data/samples/navi/components/necko_cookie.xpt +0 -0
  137. data/samples/navi/components/necko_data.xpt +0 -0
  138. data/samples/navi/components/necko_dns.xpt +0 -0
  139. data/samples/navi/components/necko_file.xpt +0 -0
  140. data/samples/navi/components/necko_ftp.xpt +0 -0
  141. data/samples/navi/components/necko_http.xpt +0 -0
  142. data/samples/navi/components/necko_res.xpt +0 -0
  143. data/samples/navi/components/necko_socket.xpt +0 -0
  144. data/samples/navi/components/necko_strconv.xpt +0 -0
  145. data/samples/navi/components/necko_viewsource.xpt +0 -0
  146. data/samples/navi/components/nsCloseAllWindows.js +0 -143
  147. data/samples/navi/components/nsDefaultCLH.js +0 -231
  148. data/samples/navi/components/nsDictionary.js +0 -148
  149. data/samples/navi/components/nsExtensionManager.js +0 -8497
  150. data/samples/navi/components/nsHelperAppDlg.js +0 -990
  151. data/samples/navi/components/nsInterfaceInfoToIDL.js +0 -590
  152. data/samples/navi/components/nsKillAll.js +0 -200
  153. data/samples/navi/components/nsPostUpdateWin.js +0 -711
  154. data/samples/navi/components/nsProgressDialog.js +0 -949
  155. data/samples/navi/components/nsProxyAutoConfig.js +0 -396
  156. data/samples/navi/components/nsResetPref.js +0 -175
  157. data/samples/navi/components/nsURLFormatter.js +0 -179
  158. data/samples/navi/components/nsUpdateService.js +0 -3074
  159. data/samples/navi/components/nsXULAppInstall.js +0 -301
  160. data/samples/navi/components/nsXmlRpcClient.js +0 -1038
  161. data/samples/navi/components/oji.xpt +0 -0
  162. data/samples/navi/components/passwordmgr.xpt +0 -0
  163. data/samples/navi/components/pipboot.xpt +0 -0
  164. data/samples/navi/components/pipnss.xpt +0 -0
  165. data/samples/navi/components/plugin.xpt +0 -0
  166. data/samples/navi/components/pref.xpt +0 -0
  167. data/samples/navi/components/prefetch.xpt +0 -0
  168. data/samples/navi/components/profile.xpt +0 -0
  169. data/samples/navi/components/progressDlg.xpt +0 -0
  170. data/samples/navi/components/proxyObject.xpt +0 -0
  171. data/samples/navi/components/rdf.xpt +0 -0
  172. data/samples/navi/components/satchel.xpt +0 -0
  173. data/samples/navi/components/saxparser.xpt +0 -0
  174. data/samples/navi/components/shistory.xpt +0 -0
  175. data/samples/navi/components/storage.xpt +0 -0
  176. data/samples/navi/components/toolkitprofile.xpt +0 -0
  177. data/samples/navi/components/transformiix.dll +0 -0
  178. data/samples/navi/components/txmgr.xpt +0 -0
  179. data/samples/navi/components/txtsvc.xpt +0 -0
  180. data/samples/navi/components/uconv.xpt +0 -0
  181. data/samples/navi/components/unicharutil.xpt +0 -0
  182. data/samples/navi/components/universalchardet.dll +0 -0
  183. data/samples/navi/components/update.xpt +0 -0
  184. data/samples/navi/components/uriloader.xpt +0 -0
  185. data/samples/navi/components/urlformatter.xpt +0 -0
  186. data/samples/navi/components/webBrowser_core.xpt +0 -0
  187. data/samples/navi/components/webbrowserpersist.xpt +0 -0
  188. data/samples/navi/components/webshell_idls.xpt +0 -0
  189. data/samples/navi/components/websrvcs.dll +0 -0
  190. data/samples/navi/components/websrvcs.xpt +0 -0
  191. data/samples/navi/components/widget.xpt +0 -0
  192. data/samples/navi/components/windowds.xpt +0 -0
  193. data/samples/navi/components/windowwatcher.xpt +0 -0
  194. data/samples/navi/components/xml-rpc.xpt +0 -0
  195. data/samples/navi/components/xmlextras.dll +0 -0
  196. data/samples/navi/components/xpcom_base.xpt +0 -0
  197. data/samples/navi/components/xpcom_components.xpt +0 -0
  198. data/samples/navi/components/xpcom_ds.xpt +0 -0
  199. data/samples/navi/components/xpcom_io.xpt +0 -0
  200. data/samples/navi/components/xpcom_obsolete.xpt +0 -0
  201. data/samples/navi/components/xpcom_thread.xpt +0 -0
  202. data/samples/navi/components/xpcom_xpti.xpt +0 -0
  203. data/samples/navi/components/xpconnect.xpt +0 -0
  204. data/samples/navi/components/xpinstall.xpt +0 -0
  205. data/samples/navi/components/xpti.dat +0 -1424
  206. data/samples/navi/components/xulapp.xpt +0 -0
  207. data/samples/navi/components/xulapp_setup.xpt +0 -0
  208. data/samples/navi/components/xuldoc.xpt +0 -0
  209. data/samples/navi/components/xulrunner.xpt +0 -0
  210. data/samples/navi/components/xultmpl.xpt +0 -0
  211. data/samples/navi/components/xulutil.dll +0 -0
  212. data/samples/navi/controlsNaviMask.png +0 -0
  213. data/samples/navi/greprefs/all.js +0 -1344
  214. data/samples/navi/greprefs/security-prefs.js +0 -69
  215. data/samples/navi/greprefs/xpinstall.js +0 -2
  216. data/samples/navi/navi_demo.rb +0 -207
  217. data/samples/navi/plugins/NPSWF32.dll +0 -0
  218. data/samples/navi/plugins/flashplayer.xpt +0 -0
  219. data/samples/navi/plugins/npnul32.dll +0 -0
  220. data/samples/navi/res/EditorOverride.css +0 -359
  221. data/samples/navi/res/Thumbs.db +0 -0
  222. data/samples/navi/res/arrow.gif +0 -0
  223. data/samples/navi/res/arrowd.gif +0 -0
  224. data/samples/navi/res/bloatcycle.html +0 -40
  225. data/samples/navi/res/broken-image.gif +0 -0
  226. data/samples/navi/res/charsetData.properties +0 -199
  227. data/samples/navi/res/charsetalias.properties +0 -517
  228. data/samples/navi/res/cmessage.txt +0 -1
  229. data/samples/navi/res/dtd/xhtml11.dtd +0 -300
  230. data/samples/navi/res/entityTables/html40Latin1.properties +0 -146
  231. data/samples/navi/res/entityTables/html40Special.properties +0 -69
  232. data/samples/navi/res/entityTables/html40Symbols.properties +0 -164
  233. data/samples/navi/res/entityTables/htmlEntityVersions.properties +0 -50
  234. data/samples/navi/res/entityTables/transliterate.properties +0 -2367
  235. data/samples/navi/res/fonts/fontEncoding.properties +0 -127
  236. data/samples/navi/res/fonts/fontNameMap.properties +0 -134
  237. data/samples/navi/res/forms.css +0 -531
  238. data/samples/navi/res/grabber.gif +0 -0
  239. data/samples/navi/res/hiddenWindow.html +0 -1
  240. data/samples/navi/res/html/Thumbs.db +0 -0
  241. data/samples/navi/res/html/gopher-audio.gif +0 -0
  242. data/samples/navi/res/html/gopher-binary.gif +0 -0
  243. data/samples/navi/res/html/gopher-find.gif +0 -0
  244. data/samples/navi/res/html/gopher-image.gif +0 -0
  245. data/samples/navi/res/html/gopher-menu.gif +0 -0
  246. data/samples/navi/res/html/gopher-movie.gif +0 -0
  247. data/samples/navi/res/html/gopher-sound.gif +0 -0
  248. data/samples/navi/res/html/gopher-telnet.gif +0 -0
  249. data/samples/navi/res/html/gopher-text.gif +0 -0
  250. data/samples/navi/res/html/gopher-unknown.gif +0 -0
  251. data/samples/navi/res/html.css +0 -478
  252. data/samples/navi/res/langGroups.properties +0 -236
  253. data/samples/navi/res/language.properties +0 -259
  254. data/samples/navi/res/loading-image.gif +0 -0
  255. data/samples/navi/res/quirk.css +0 -282
  256. data/samples/navi/res/samples/Anieyes.gif +0 -0
  257. data/samples/navi/res/samples/Thumbs.db +0 -0
  258. data/samples/navi/res/samples/aform.css +0 -69
  259. data/samples/navi/res/samples/beeptest.html +0 -18
  260. data/samples/navi/res/samples/bform.css +0 -45
  261. data/samples/navi/res/samples/bg.jpg +0 -0
  262. data/samples/navi/res/samples/cform.css +0 -40
  263. data/samples/navi/res/samples/checkboxTest.xul +0 -47
  264. data/samples/navi/res/samples/demoform.css +0 -97
  265. data/samples/navi/res/samples/find.html +0 -97
  266. data/samples/navi/res/samples/gear1.gif +0 -0
  267. data/samples/navi/res/samples/image_props.html +0 -58
  268. data/samples/navi/res/samples/mozform.css +0 -256
  269. data/samples/navi/res/samples/printsetup.html +0 -175
  270. data/samples/navi/res/samples/raptor.jpg +0 -0
  271. data/samples/navi/res/samples/rock_gra.gif +0 -0
  272. data/samples/navi/res/samples/scrollbarTest1.xul +0 -66
  273. data/samples/navi/res/samples/scrollbarTest2.xul +0 -19
  274. data/samples/navi/res/samples/sliderTest1.xul +0 -14
  275. data/samples/navi/res/samples/soundtest.html +0 -20
  276. data/samples/navi/res/samples/test.wav +0 -0
  277. data/samples/navi/res/samples/test0.html +0 -220
  278. data/samples/navi/res/samples/test1.html +0 -84
  279. data/samples/navi/res/samples/test10.html +0 -16
  280. data/samples/navi/res/samples/test11.html +0 -42
  281. data/samples/navi/res/samples/test12.html +0 -79
  282. data/samples/navi/res/samples/test13.html +0 -126
  283. data/samples/navi/res/samples/test14.html +0 -5
  284. data/samples/navi/res/samples/test15.html +0 -5
  285. data/samples/navi/res/samples/test16.html +0 -124
  286. data/samples/navi/res/samples/test2.html +0 -41
  287. data/samples/navi/res/samples/test3.html +0 -126
  288. data/samples/navi/res/samples/test4.html +0 -335
  289. data/samples/navi/res/samples/test5.html +0 -199
  290. data/samples/navi/res/samples/test6.html +0 -335
  291. data/samples/navi/res/samples/test7.html +0 -11
  292. data/samples/navi/res/samples/test8-1.html +0 -66
  293. data/samples/navi/res/samples/test8.html +0 -662
  294. data/samples/navi/res/samples/test8dom.html +0 -64
  295. data/samples/navi/res/samples/test8sca.html +0 -308
  296. data/samples/navi/res/samples/test8siz.html +0 -224
  297. data/samples/navi/res/samples/test8tab.html +0 -9
  298. data/samples/navi/res/samples/test9.html +0 -12
  299. data/samples/navi/res/samples/test9a.html +0 -39
  300. data/samples/navi/res/samples/test9b.html +0 -16
  301. data/samples/navi/res/samples/test_ed.html +0 -5
  302. data/samples/navi/res/samples/test_form.html +0 -34
  303. data/samples/navi/res/samples/test_gfx.html +0 -75
  304. data/samples/navi/res/samples/test_lbox.html +0 -100
  305. data/samples/navi/res/samples/test_pr.html +0 -87
  306. data/samples/navi/res/samples/test_weight.html +0 -45
  307. data/samples/navi/res/samples/toolbarTest1.xul +0 -51
  308. data/samples/navi/res/samples/treeTest1.css +0 -62
  309. data/samples/navi/res/samples/treeTest1.xul +0 -110
  310. data/samples/navi/res/samples/xulTest.css +0 -130
  311. data/samples/navi/res/svg.css +0 -64
  312. data/samples/navi/res/table-add-column-after-active.gif +0 -0
  313. data/samples/navi/res/table-add-column-after-hover.gif +0 -0
  314. data/samples/navi/res/table-add-column-after.gif +0 -0
  315. data/samples/navi/res/table-add-column-before-active.gif +0 -0
  316. data/samples/navi/res/table-add-column-before-hover.gif +0 -0
  317. data/samples/navi/res/table-add-column-before.gif +0 -0
  318. data/samples/navi/res/table-add-row-after-active.gif +0 -0
  319. data/samples/navi/res/table-add-row-after-hover.gif +0 -0
  320. data/samples/navi/res/table-add-row-after.gif +0 -0
  321. data/samples/navi/res/table-add-row-before-active.gif +0 -0
  322. data/samples/navi/res/table-add-row-before-hover.gif +0 -0
  323. data/samples/navi/res/table-add-row-before.gif +0 -0
  324. data/samples/navi/res/table-remove-column-active.gif +0 -0
  325. data/samples/navi/res/table-remove-column-hover.gif +0 -0
  326. data/samples/navi/res/table-remove-column.gif +0 -0
  327. data/samples/navi/res/table-remove-row-active.gif +0 -0
  328. data/samples/navi/res/table-remove-row-hover.gif +0 -0
  329. data/samples/navi/res/table-remove-row.gif +0 -0
  330. data/samples/navi/res/throbber/Thumbs.db +0 -0
  331. data/samples/navi/res/throbber/anim.gif +0 -0
  332. data/samples/navi/res/throbber/anims00.gif +0 -0
  333. data/samples/navi/res/throbber/anims01.gif +0 -0
  334. data/samples/navi/res/throbber/anims02.gif +0 -0
  335. data/samples/navi/res/throbber/anims03.gif +0 -0
  336. data/samples/navi/res/throbber/anims04.gif +0 -0
  337. data/samples/navi/res/throbber/anims05.gif +0 -0
  338. data/samples/navi/res/throbber/anims06.gif +0 -0
  339. data/samples/navi/res/throbber/anims07.gif +0 -0
  340. data/samples/navi/res/throbber/anims08.gif +0 -0
  341. data/samples/navi/res/throbber/anims09.gif +0 -0
  342. data/samples/navi/res/throbber/anims10.gif +0 -0
  343. data/samples/navi/res/throbber/anims11.gif +0 -0
  344. data/samples/navi/res/throbber/anims12.gif +0 -0
  345. data/samples/navi/res/throbber/anims13.gif +0 -0
  346. data/samples/navi/res/throbber/anims14.gif +0 -0
  347. data/samples/navi/res/throbber/anims15.gif +0 -0
  348. data/samples/navi/res/throbber/anims16.gif +0 -0
  349. data/samples/navi/res/throbber/anims17.gif +0 -0
  350. data/samples/navi/res/throbber/anims18.gif +0 -0
  351. data/samples/navi/res/throbber/anims19.gif +0 -0
  352. data/samples/navi/res/throbber/anims20.gif +0 -0
  353. data/samples/navi/res/throbber/anims21.gif +0 -0
  354. data/samples/navi/res/throbber/anims22.gif +0 -0
  355. data/samples/navi/res/throbber/anims23.gif +0 -0
  356. data/samples/navi/res/throbber/anims24.gif +0 -0
  357. data/samples/navi/res/throbber/anims25.gif +0 -0
  358. data/samples/navi/res/throbber/anims26.gif +0 -0
  359. data/samples/navi/res/throbber/anims27.gif +0 -0
  360. data/samples/navi/res/throbber/anims28.gif +0 -0
  361. data/samples/navi/res/throbber/anims29.gif +0 -0
  362. data/samples/navi/res/ua.css +0 -235
  363. data/samples/navi/res/viewer.properties +0 -1
  364. data/samples/navi/res/viewsource.css +0 -118
  365. data/samples/navi/res/wincharset.properties +0 -55
  366. data/samples/navi/resources.cfg +0 -14
  367. data/samples/navi/testNaviMask.png +0 -0
  368. data/samples/render_run_log.5796 +0 -891
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/ruby -w
2
+
3
+ $: << File.dirname(__FILE__) + "/.."
4
+ require 'ogre'
5
+ require 'application'
6
+ include Ogre
7
+
8
+ CUSTOM_SHININESS = 1
9
+ CUSTOM_DIFFUSE = 2
10
+ CUSTOM_SPECULAR = 3
11
+
12
+ class CelShadingListener < ApplicationFrameListener
13
+ def initialize(root, window, camera, scene_manager)
14
+ super(root, window, camera)
15
+ @scene_manager = scene_manager
16
+ @curvature = 1
17
+ @tiling = 15
18
+
19
+ @time_delay = 0
20
+ end
21
+
22
+ def frame_started(event)
23
+ return false unless super(event)
24
+
25
+ $rot_node.yaw(Degree.new(event.time_since_last_frame * 30))
26
+
27
+ true
28
+ end
29
+ end
30
+
31
+ class CelShadingApplication < Ogre::Application
32
+
33
+ def create_scene
34
+ caps = root.get_render_system.get_capabilities
35
+ if !caps.has_capability?(RSC_VERTEX_PROGRAM) || !caps.has_capability?(RSC_FRAGMENT_PROGRAM)
36
+ raise "Your card does not support vertex or fragmet programs, so we cannot run this demo. Sorry"
37
+ end
38
+
39
+ light = scene_manager.create_light("MainLight")
40
+ $rot_node = scene_manager.root_scene_node.create_child_scene_node
41
+ $rot_node.create_child_scene_node(Vector3.new(20, 40, 50)).attach_object(light)
42
+
43
+ ent = scene_manager.create_entity("head", "ogrehead.mesh")
44
+
45
+ camera.set_position(20, 0, 100)
46
+ camera.look_at(0,0,0)
47
+
48
+ # eyes
49
+ sub = ent.get_sub_entity(0)
50
+ sub.set_material_name("CelShading")
51
+ sub.set_custom_parameter(CUSTOM_SHININESS, Vector4.new(35.0, 0.0, 0.0, 0.0))
52
+ sub.set_custom_parameter(CUSTOM_DIFFUSE, Vector4.new(1.0, 0.3, 0.3, 1.0))
53
+ sub.set_custom_parameter(CUSTOM_SPECULAR, Vector4.new(1.0, 0.6, 0.6, 1.0))
54
+ # skin
55
+ sub = ent.get_sub_entity(1)
56
+ sub.set_material_name("CelShading")
57
+ sub.set_custom_parameter(CUSTOM_SHININESS, Vector4.new(10.0, 0.0, 0.0, 0.0))
58
+ sub.set_custom_parameter(CUSTOM_DIFFUSE, Vector4.new(0.0, 0.5, 0.0, 1.0))
59
+ sub.set_custom_parameter(CUSTOM_SPECULAR, Vector4.new(0.3, 0.5, 0.3, 1.0))
60
+ # earring
61
+ sub = ent.get_sub_entity(2)
62
+ sub.set_material_name("CelShading")
63
+ sub.set_custom_parameter(CUSTOM_SHININESS, Vector4.new(25.0, 0.0, 0.0, 0.0))
64
+ sub.set_custom_parameter(CUSTOM_DIFFUSE, Vector4.new(1.0, 1.0, 0.0, 1.0))
65
+ sub.set_custom_parameter(CUSTOM_SPECULAR, Vector4.new(1.0, 1.0, 0.7, 1.0))
66
+ # teeth
67
+ sub = ent.get_sub_entity(3)
68
+ sub.set_material_name("CelShading")
69
+ sub.set_custom_parameter(CUSTOM_SHININESS, Vector4.new(20.0, 0.0, 0.0, 0.0))
70
+ sub.set_custom_parameter(CUSTOM_DIFFUSE, Vector4.new(1.0, 1.0, 0.7, 1.0))
71
+ sub.set_custom_parameter(CUSTOM_SPECULAR, Vector4.new(1.0, 1.0, 1.0, 1.0))
72
+
73
+ # Add entity to the root scene node
74
+ scene_manager.root_scene_node.create_child_scene_node.attach_object(ent)
75
+
76
+ window.get_viewport(0).set_background_colour(ColourValue.White)
77
+ end
78
+
79
+ def create_frame_listener
80
+ self.frame_listener = CelShadingListener.new(root, window, camera, scene_manager)
81
+ end
82
+ end
83
+
84
+ app = CelShadingApplication.new
85
+ app.go
data/samples/grass.rb CHANGED
@@ -74,7 +74,7 @@ class GrassListener < ApplicationFrameListener
74
74
  $anim_state.add_time(event.time_since_last_frame)
75
75
  end
76
76
 
77
- if keyboard.key_down?(OIS::KC_B) && time_delay <= 0
77
+ if keyboard.key_down?(OIS::KC_B) && @time_delay <= 0
78
78
  @time_delay = 1
79
79
  @show_bbs = !@show_bbs
80
80
  @scene_manager.show_bounding_boxes(@show_bbs)
@@ -0,0 +1,63 @@
1
+
2
+ /* Cel shading vertex program for single-pass rendering
3
+ In this program, we want to calculate the diffuse and specular
4
+ ramp components, and the edge factor (for doing simple outlining)
5
+ For the outlining to look good, we need a pretty well curved model.
6
+ */
7
+ void main_vp(float4 position : POSITION,
8
+ float3 normal : NORMAL,
9
+ // outputs
10
+ out float4 oPosition : POSITION,
11
+ out float diffuse : TEXCOORD0,
12
+ out float specular : TEXCOORD1,
13
+ out float edge : TEXCOORD2,
14
+ // parameters
15
+ uniform float3 lightPosition, // object space
16
+ uniform float3 eyePosition, // object space
17
+ uniform float4 shininess,
18
+ uniform float4x4 worldViewProj)
19
+ {
20
+ // calculate output position
21
+ oPosition = mul(worldViewProj, position);
22
+
23
+ // calculate light vector
24
+ float3 N = normalize(normal);
25
+ float3 L = normalize(lightPosition - position.xyz);
26
+
27
+ // Calculate diffuse component
28
+ diffuse = max(dot(N, L) , 0);
29
+
30
+ // Calculate specular component
31
+ float3 E = normalize(eyePosition - position.xyz);
32
+ float3 H = normalize(L + E);
33
+ specular = pow(max(dot(N, H), 0), shininess);
34
+ // Mask off specular if diffuse is 0
35
+ if (diffuse == 0) specular = 0;
36
+
37
+ // Edge detection, dot eye and normal vectors
38
+ edge = max(dot(N, E), 0);
39
+ }
40
+
41
+ void main_fp(float diffuseIn : TEXCOORD0,
42
+ float specularIn : TEXCOORD1,
43
+ float edge : TEXCOORD2,
44
+
45
+ out float4 colour : COLOR,
46
+
47
+ uniform float4 diffuse,
48
+ uniform float4 specular,
49
+
50
+ uniform sampler1D diffuseRamp,
51
+ uniform sampler1D specularRamp,
52
+ uniform sampler1D edgeRamp)
53
+ {
54
+ // Step functions from textures
55
+ diffuseIn = tex1D(diffuseRamp, diffuseIn).x;
56
+ specularIn = tex1D(specularRamp, specularIn).x;
57
+ edge = tex1D(edgeRamp, edge).x;
58
+
59
+ colour = edge * ((diffuse * diffuseIn) +
60
+ (specular * specularIn));
61
+ }
62
+
63
+
@@ -0,0 +1,68 @@
1
+ // -------------------------------
2
+ // Cel Shading Section
3
+ // -------------------------------
4
+ vertex_program Ogre/CelShadingVP cg
5
+ {
6
+ source CelShading.cg
7
+ entry_point main_vp
8
+ profiles vs_1_1 arbvp1
9
+
10
+ default_params
11
+ {
12
+ param_named_auto lightPosition light_position_object_space 0
13
+ param_named_auto eyePosition camera_position_object_space
14
+ param_named_auto worldViewProj worldviewproj_matrix
15
+ param_named shininess float 10
16
+ }
17
+ }
18
+
19
+ fragment_program Ogre/CelShadingFP cg
20
+ {
21
+ source CelShading.cg
22
+ entry_point main_fp
23
+ profiles ps_1_1 arbfp1 fp20
24
+ }
25
+
26
+
27
+ material CelShading
28
+ {
29
+ technique
30
+ {
31
+ pass
32
+ {
33
+ vertex_program_ref Ogre/CelShadingVP
34
+ {
35
+ // map shininess from custom renderable param 1
36
+ param_named_auto shininess custom 1
37
+ }
38
+ fragment_program_ref Ogre/CelShadingFP
39
+ {
40
+ // map diffuse from custom renderable param 2
41
+ param_named_auto diffuse custom 2
42
+ // map specular from custom renderable param 2
43
+ param_named_auto specular custom 3
44
+ }
45
+ texture_unit
46
+ {
47
+ texture cel_shading_diffuse.png 1d
48
+ tex_address_mode clamp
49
+ filtering none
50
+ }
51
+ texture_unit
52
+ {
53
+ texture cel_shading_specular.png 1d
54
+ tex_address_mode clamp
55
+ filtering none
56
+ tex_coord_set 1
57
+ }
58
+ texture_unit
59
+ {
60
+ texture cel_shading_edge.png 1d
61
+ tex_address_mode clamp
62
+ filtering none
63
+ tex_coord_set 2
64
+ }
65
+ }
66
+ }
67
+
68
+ }
data/samples/ogre.cfg CHANGED
@@ -4,5 +4,4 @@ Render System=OpenGL Rendering Subsystem
4
4
  FSAA=0
5
5
  Full Screen=No
6
6
  RTT Preferred Mode=FBO
7
- Refresh Rate=Not applicable
8
- Video Mode=1280 x 1024
7
+ Video Mode=800 x 600
data/samples/plugins.cfg CHANGED
@@ -1,10 +1,11 @@
1
1
  # Defines plugins to load
2
2
 
3
3
  # Define plugin folder
4
- #PluginFolder=D:\Programming\engines\Ogre1.4.1SDK\bin\release
5
- PluginFolder=/usr/local/lib/OGRE/
4
+ #PluginFolder=D:\Programming\engines\Ogre1.4.4SDK\bin\release
5
+ PluginFolder=/usr/local/ogre/lib/OGRE/
6
6
 
7
7
  Plugin=RenderSystem_GL
8
+ #Plugin=RenderSystem_Direct3D9
8
9
  Plugin=Plugin_OctreeSceneManager
9
10
  Plugin=Plugin_ParticleFX
10
11
  Plugin=Plugin_BSPSceneManager
data/test/ogre.cfg ADDED
@@ -0,0 +1,10 @@
1
+ Render System=OpenGL Rendering Subsystem
2
+
3
+ [OpenGL Rendering Subsystem]
4
+ Colour Depth=32
5
+ Display Frequency=N/A
6
+ FSAA=0
7
+ Full Screen=No
8
+ RTT Preferred Mode=FBO
9
+ VSync=No
10
+ Video Mode=1024 x 768
@@ -1,10 +1,8 @@
1
1
  # Defines plugins to load
2
2
 
3
3
  # Define plugin folder
4
- PluginFolder=.
4
+ PluginFolder=D:\Programming\engines\Ogre1.4.4SDK\bin\release
5
5
  #PluginFolder=/usr/local/lib/OGRE/
6
6
 
7
7
  Plugin=RenderSystem_GL
8
- Plugin=RenderSystem_Direct3D9
9
- Plugin=Plugin_OctreeSceneManager
10
- Plugin=Plugin_ParticleFX
8
+ #Plugin=Plugin_ParticleFX
@@ -0,0 +1,67 @@
1
+ $: << File.expand_path( File.dirname(__FILE__) )
2
+ require File.dirname(__FILE__) + "/../ogre"
3
+ require "test/unit"
4
+
5
+ class Test::Unit::TestCase
6
+ include Ogre
7
+
8
+ # Run through Ogre setup routines so we have access to the system.
9
+ #
10
+ # Any test classes that override #setup will need to call super
11
+ #
12
+ # I use class variables to make sure only one window pops up instead
13
+ # of one per test case, which would make things really, really slow.
14
+ # In the else clause here, do any cleanup you need.
15
+ def setup
16
+ @@root ||= nil
17
+ unless @@root
18
+ @@log_manager = LogManager.new
19
+ @@log_manager.create_log("Test.log",true,false,false)
20
+
21
+ dir = File.expand_path( File.dirname(__FILE__) )
22
+ @@root = Root.new "#{dir}/plugins.cfg", "#{dir}/ogre.cfg", "Test.log"
23
+ @@scene_manager = @@root.create_scene_manager(ST_GENERIC, "test")
24
+
25
+ # If needed later
26
+ #media_path = File.expand_path(File.dirname(__FILE__)+"/media")
27
+ #ResourceGroupManager.instance.add_resource_location(media_path, "FileSystem", "General")
28
+
29
+ # Find a renderer to use
30
+ renderers = @@root.get_available_renderers
31
+ @@root.set_render_system(renderers[0])
32
+
33
+ @@root.initialise(false)
34
+
35
+ # I really, really don't want this!
36
+ # but I don't seem to have a choice right now.
37
+ @@window = @@root.create_render_window("Testing Ogre", 320, 240, false)
38
+
39
+ ResourceGroupManager.instance.initialise_all_resource_groups
40
+ end
41
+ end
42
+
43
+ def teardown
44
+ @@scene_manager.clear_scene
45
+ end
46
+
47
+ def scene_manager
48
+ @@scene_manager
49
+ end
50
+
51
+ def window
52
+ @@window
53
+ end
54
+
55
+
56
+ # An interesting BDD function
57
+ def self.should(behave,&block)
58
+ mname = "test_should_#{behave}"
59
+ if block
60
+ define_method mname, &block
61
+ else
62
+ define_method mname do
63
+ flunk "#{self.class.name.sub(/Test$/,'')} should #{behave}"
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,66 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class ConstantsTest < Test::Unit::TestCase
4
+
5
+ should "have constantized methods for Vector3" do
6
+ {
7
+ :ZERO => [0, 0, 0],
8
+ :UNIT_X => [1, 0, 0],
9
+ :UNIT_Y => [0, 1, 0],
10
+ :UNIT_Z => [0, 0, 1],
11
+ :NEGATIVE_UNIT_X => [-1, 0, 0],
12
+ :NEGATIVE_UNIT_Y => [0, -1, 0],
13
+ :NEGATIVE_UNIT_Z => [0, 0, -1],
14
+ :UNIT_SCALE => [1, 1, 1]
15
+ }.each do |method, expected|
16
+ vec = Vector3.send(method)
17
+ assert_equal expected, [vec.x, vec.y, vec.z]
18
+
19
+ # And test that we don't destroy the initial data like
20
+ # Ruby constants like to do
21
+ vec.x = 10
22
+ vec.y = 20
23
+ vec.z = 30
24
+ vec2 = Vector3.send(method)
25
+ assert_not_equal [vec2.x, vec2.y, vec2.z], [vec.x, vec.y, vec.z]
26
+ end
27
+ end
28
+
29
+ should "have constantized methods for Vector4" do
30
+ {
31
+ :ZERO => [0, 0, 0, 0],
32
+ }.each do |method, expected|
33
+ vec = Vector4.send(method)
34
+ assert_equal expected, [vec.x, vec.y, vec.z, vec.w]
35
+
36
+ # And test that we don't destroy the initial data like
37
+ # Ruby constants like to do
38
+ vec.x = 10
39
+ vec.y = 20
40
+ vec.z = 30
41
+ vec.w = 40
42
+ vec2 = Vector4.send(method)
43
+ assert_not_equal [vec2.x, vec2.y, vec2.z, vec2.w], [vec.x, vec.y, vec.z, vec.w]
44
+ end
45
+ end
46
+
47
+ should "have constantized methods for Quanternion" do
48
+ {
49
+ :ZERO => [0.0, 0.0, 0.0, 0.0],
50
+ :IDENTITY => [1.0, 0.0, 0.0, 0.0]
51
+ }.each do |method, expected|
52
+ quat = Quaternion.send(method)
53
+ assert_equal expected, [quat.w, quat.x, quat.y, quat.z]
54
+
55
+ # And test that we don't destroy the initial data like
56
+ # Ruby constants like to do
57
+ quat.x = 10
58
+ quat.y = 20
59
+ quat.z = 30
60
+ quat.w = 40
61
+ quat2 = Quaternion.send(method)
62
+ assert_not_equal [quat2.x, quat2.y, quat2.z, quat2.w], [quat.x, quat.y, quat.z, quat.w]
63
+ end
64
+ end
65
+
66
+ end
@@ -0,0 +1,28 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class FrameStatsProxyTest < Test::Unit::TestCase
4
+
5
+ should "wrap Ogre::FrameStats into our own FrameStatsProxy" do
6
+ stats = window.get_statistics
7
+ assert_not_nil stats
8
+ assert stats.is_a?(FrameStatsProxy)
9
+ end
10
+
11
+ should "have certain methods for accessing render stats" do
12
+ stats = FrameStatsProxy.new window
13
+
14
+ %w(
15
+ last_fps
16
+ avg_fps
17
+ best_fps
18
+ worst_fps
19
+ best_frame_time
20
+ worst_frame_time
21
+ triangle_count
22
+ batch_count
23
+ ).each do |method|
24
+ assert stats.respond_to?(method)
25
+ end
26
+ end
27
+
28
+ end
@@ -0,0 +1,20 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class MathTest < Test::Unit::TestCase
4
+
5
+ should "properly take in Degrees and Radians interchangably" do
6
+ light = scene_manager.create_light("Testing Light")
7
+
8
+ rad = Radian.new(::Math::PI)
9
+ deg = Degree.new(180)
10
+
11
+ # Radians in, Radians out
12
+ light.set_spotlight_inner_angle(rad)
13
+ assert_equal rad, light.get_spotlight_inner_angle
14
+
15
+ # Degrees in, Radians out
16
+ light.set_spotlight_inner_angle(deg)
17
+ assert_in_delta rad.value_radians,
18
+ light.get_spotlight_inner_angle.value_radians, 0.0001
19
+ end
20
+ end
@@ -0,0 +1,15 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class MeshTest < Test::Unit::TestCase
4
+
5
+ should "have a few new methods" do
6
+ assert Mesh.instance_methods.include?("shared_vertex_data=")
7
+ assert Mesh.instance_methods.include?("shared_vertex_data")
8
+ assert Mesh.instance_methods.include?("suggest_tangent_vector_build_params")
9
+ end
10
+
11
+ should "not have other methods" do
12
+ assert !Mesh.instance_methods.include?("get_pose_iterator")
13
+ end
14
+
15
+ end
@@ -0,0 +1,98 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class MethodsTest < Test::Unit::TestCase
4
+
5
+ should "be able to access Singletons through #instance" do
6
+ assert ResourceGroupManager.respond_to?(:instance)
7
+ assert MeshManager.respond_to?(:instance)
8
+ assert MaterialManager.respond_to?(:instance)
9
+ end
10
+
11
+ should "have numerous bang (!) or query (?) methods" do
12
+ assert Vector3.new.respond_to?(:normalise!)
13
+ assert RenderWindow.instance_methods.include?("closed?")
14
+ assert SubMesh.instance_methods.include?("is_mat_initialised?")
15
+ end
16
+
17
+ should "have certain methods" do
18
+ assert FrameEvent.instance_methods.include?("time_since_last_frame")
19
+ assert FrameEvent.instance_methods.include?("time_since_last_event")
20
+ end
21
+
22
+ should "be ignoring other methods for various reasons" do
23
+ assert !AxisAlignedBox.new.respond_to?(:get_corner)
24
+
25
+ assert !ResourceGroupManager.instance.respond_to?(:resource_exists)
26
+
27
+ assert !BillboardChain.instance_methods.include?(:add_chain_element)
28
+ assert !BillboardChain.instance_methods.include?(:update_chain_element)
29
+ assert !BillboardChain.instance_methods.include?(:get_chain_element)
30
+
31
+ assert !ConfigFile.instance_methods.include?(:load)
32
+
33
+ assert !KeyFrame.instance_methods.include?(:get_post_reference_iterator)
34
+
35
+ assert !Node.instance_methods.include?(:get_child_iterator)
36
+ assert !Node.instance_methods.include?(:set_listener)
37
+ assert !Node.instance_methods.include?(:get_listener)
38
+
39
+ assert !ParticleSystem.instance_methods.include?(:_get_iterator)
40
+
41
+ assert !Pass.instance_methods.include?(:set_hash_function)
42
+ assert !Pass.instance_methods.include?(:get_hash_function)
43
+
44
+ assert !PatchMesh.instance_methods.include?(:get_pose_iterator)
45
+
46
+ assert !RenderQueue.instance_methods.include?(:set_renderable_listener)
47
+ assert !RenderQueue.instance_methods.include?(:get_renderable_listener)
48
+
49
+ assert !RenderSystem.instance_methods.include?(:add_listener)
50
+ assert !RenderSystem.instance_methods.include?(:remove_listener)
51
+ assert !RenderSystem.instance_methods.include?(:register_thread)
52
+ assert !RenderSystem.instance_methods.include?(:unregister_thread)
53
+
54
+ assert !SceneNode.instance_methods.include?(:get_attached_object_iterator)
55
+
56
+ assert !TextureUnitState.instance_methods.include?(:add_effect)
57
+ assert !TextureUnitState.instance_methods.include?(:remove_effect)
58
+
59
+ assert !ManualObject.instance_methods.include?(:get_shadow_volume_renderable_iterator)
60
+ end
61
+
62
+ should "have fixed method names related to public instance variables of classes (method_fixes.rb)" do
63
+ %w(
64
+ use_shared_vertices?
65
+ use_shared_vertices=
66
+ vertex_data
67
+ vertex_data=
68
+ index_data
69
+ index_data=
70
+ ).each do |method|
71
+ assert SubMesh.new.respond_to?(method)
72
+ end
73
+
74
+ %w(
75
+ vertex_declaration
76
+ vertex_declaration=
77
+ vertex_buffer_binding
78
+ vertex_buffer_binding=
79
+ vertex_start
80
+ vertex_start=
81
+ vertex_count
82
+ vertex_count=
83
+ ).each do |method|
84
+ assert VertexData.new.respond_to?(method)
85
+ end
86
+
87
+ %w(
88
+ index_buffer
89
+ index_buffer=
90
+ index_start
91
+ index_start=
92
+ index_count
93
+ index_count=
94
+ ).each do |method|
95
+ assert IndexData.new.respond_to?(method)
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,19 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class MovableObjectTest < Test::Unit::TestCase
4
+
5
+ should "be properly cast to their real subclasses on C++ -> Ruby" do
6
+ mo = scene_manager.create_movable_object("myThingy", "Light", {})
7
+ assert_equal "myThingy", mo.get_name
8
+ assert mo.is_a?(Light)
9
+ end
10
+
11
+ should "not have listener methods" do
12
+ mo = scene_manager.create_movable_object("myThingy", "Light", {})
13
+
14
+ assert !mo.respond_to?(:set_listener)
15
+ assert !mo.respond_to?(:get_listener)
16
+ assert !mo.respond_to?(:extract_movable_object)
17
+ end
18
+
19
+ end
@@ -0,0 +1,12 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class NameValuePairListTest < Test::Unit::TestCase
4
+
5
+ should "be able to pass in a Ruby hash into methods expecting NameValuePairList" do
6
+ trail = scene_manager.create_movable_object("RibbonTrail1", "RibbonTrail",
7
+ {"numberOfChains" => "2", "maxElements" => "80"})
8
+ assert_equal 80, trail.get_max_chain_elements
9
+ assert_equal 2, trail.get_number_of_chains
10
+ end
11
+
12
+ end
@@ -0,0 +1,20 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class OverlayElementTest < Test::Unit::TestCase
4
+
5
+ should "be properly cast to their real subclasses on C++ -> Ruby" do
6
+ element = OverlayManager.instance.create_overlay_element("Panel", "TestPanel")
7
+ assert_not_nil element
8
+ assert element.is_a?(PanelOverlayElement)
9
+
10
+ text_element = OverlayManager.instance.create_overlay_element("TextArea",
11
+ "Tester")
12
+ assert_not_nil text_element
13
+ assert text_element.is_a?(TextAreaOverlayElement)
14
+
15
+ element2 = OverlayManager.instance.get_overlay_element("TestPanel")
16
+ assert element2.is_a?(PanelOverlayElement)
17
+ assert_equal element.get_name, element2.get_name
18
+ end
19
+
20
+ end
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class RenderTargetTest < Test::Unit::TestCase
4
+
5
+ should "have a specially wrapped getCustomAttribute method" do
6
+ assert window.respond_to?(:get_custom_attribute_unsigned_long)
7
+ assert !RenderTarget.instance_methods.include?("get_custom_attribute")
8
+ assert !RenderTarget.instance_methods.include?("_getImpl")
9
+ end
10
+
11
+ end
@@ -0,0 +1,26 @@
1
+ require File.dirname(__FILE__) + "/../test_helper"
2
+
3
+ class ResourceTest < Test::Unit::TestCase
4
+
5
+ def teardown
6
+ super
7
+ MeshManager.instance.remove_all
8
+ end
9
+
10
+ should "be properly cast to their real subclasses on C++ -> Ruby" do
11
+ mesh = MeshManager.instance.create("TestMesh", "General")
12
+ assert mesh.is_a?(MeshPtr)
13
+
14
+ material = MaterialManager.instance.create("TestMaterial", "General")
15
+ assert material.is_a?(MaterialPtr)
16
+ end
17
+
18
+ should "not have listener methods" do
19
+ mesh = MeshManager.instance.create("TestMesh", "General")
20
+
21
+ assert !mesh.respond_to?(:add_listener)
22
+ assert !mesh.respond_to?(:remove_listener)
23
+ assert !mesh.respond_to?(:extract_resource)
24
+ end
25
+
26
+ end