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.
- data/README +43 -5
- data/Rakefile +67 -165
- data/lib/application.rb +2 -1
- data/lib/application_frame_listener.rb +17 -17
- data/lib/ogre.so +0 -0
- data/lib/ruby_ois.so +0 -0
- data/ogre.rb +3 -0
- data/samples/Ogre.log +358 -257
- data/samples/cel_shading.rb +85 -0
- data/samples/grass.rb +1 -1
- data/samples/media/materials/programs/CelShading.cg +63 -0
- data/samples/media/materials/scripts/CelShading.material +68 -0
- data/samples/media/materials/textures/cel_shading_diffuse.png +0 -0
- data/samples/media/materials/textures/cel_shading_edge.png +0 -0
- data/samples/media/materials/textures/cel_shading_specular.png +0 -0
- data/samples/ogre.cfg +1 -2
- data/samples/plugins.cfg +3 -2
- data/test/ogre.cfg +10 -0
- data/{samples/navi → test}/plugins.cfg +2 -4
- data/test/test_helper.rb +67 -0
- data/test/unit/constants_test.rb +66 -0
- data/test/unit/frame_stats_proxy_test.rb +28 -0
- data/test/unit/math_test.rb +20 -0
- data/test/unit/mesh_test.rb +15 -0
- data/test/unit/methods_test.rb +98 -0
- data/test/unit/movable_object_test.rb +19 -0
- data/test/unit/name_value_pair_list_test.rb +12 -0
- data/test/unit/overlay_element_test.rb +20 -0
- data/test/unit/render_target_test.rb +11 -0
- data/test/unit/resource_test.rb +26 -0
- data/test/unit/scene_manager_test.rb +21 -0
- metadata +25 -356
- data/samples/navi/Media/NaviDemo.material +0 -60
- data/samples/navi/Media/OgreCore.zip +0 -0
- data/samples/navi/Media/cerulean.jpg +0 -0
- data/samples/navi/Media/clouds.jpg +0 -0
- data/samples/navi/Media/controlsNaviMask.png +0 -0
- data/samples/navi/Media/grass.jpg +0 -0
- data/samples/navi/Media/knot.mesh +0 -0
- data/samples/navi/Media/testNaviMask.png +0 -0
- data/samples/navi/NaviLocal/Navi.js +0 -136
- data/samples/navi/NaviLocal/buttonBg.jpg +0 -0
- data/samples/navi/NaviLocal/controls.html +0 -303
- data/samples/navi/NaviLocal/knobBg.jpg +0 -0
- data/samples/navi/NaviLocal/moo.dropdownmenu.js +0 -87
- data/samples/navi/NaviLocal/mootools.v1.1.js +0 -6964
- data/samples/navi/NaviLocal/naviLogo.html +0 -32
- data/samples/navi/NaviLocal/naviLogo.png +0 -0
- data/samples/navi/NaviLocal/pageBg.jpg +0 -0
- data/samples/navi/NaviLocal/sliderBg.jpg +0 -0
- data/samples/navi/NaviLocal/test.html +0 -5
- data/samples/navi/NaviLocal/welcome.html +0 -36
- data/samples/navi/NaviLocal/welcome.png +0 -0
- data/samples/navi/chrome/chromelist.txt +0 -597
- data/samples/navi/chrome/classic.jar +0 -0
- data/samples/navi/chrome/classic.manifest +0 -4
- data/samples/navi/chrome/comm.jar +0 -0
- data/samples/navi/chrome/comm.manifest +0 -2
- data/samples/navi/chrome/en-US.jar +0 -0
- data/samples/navi/chrome/en-US.manifest +0 -9
- data/samples/navi/chrome/toolkit.jar +0 -0
- data/samples/navi/chrome/toolkit.manifest +0 -6
- data/samples/navi/components/FeedProcessor.js +0 -1825
- data/samples/navi/components/alerts.xpt +0 -0
- data/samples/navi/components/appshell.xpt +0 -0
- data/samples/navi/components/appstartup.xpt +0 -0
- data/samples/navi/components/auth.dll +0 -0
- data/samples/navi/components/autocomplete.xpt +0 -0
- data/samples/navi/components/autoconfig.dll +0 -0
- data/samples/navi/components/autoconfig.xpt +0 -0
- data/samples/navi/components/caps.xpt +0 -0
- data/samples/navi/components/chardet.xpt +0 -0
- data/samples/navi/components/chrome.xpt +0 -0
- data/samples/navi/components/commandhandler.xpt +0 -0
- data/samples/navi/components/commandlines.xpt +0 -0
- data/samples/navi/components/composer.xpt +0 -0
- data/samples/navi/components/compreg.dat +0 -1474
- data/samples/navi/components/content_base.xpt +0 -0
- data/samples/navi/components/content_html.xpt +0 -0
- data/samples/navi/components/content_htmldoc.xpt +0 -0
- data/samples/navi/components/content_xmldoc.xpt +0 -0
- data/samples/navi/components/content_xslt.xpt +0 -0
- data/samples/navi/components/content_xtf.xpt +0 -0
- data/samples/navi/components/directory.xpt +0 -0
- data/samples/navi/components/docshell_base.xpt +0 -0
- data/samples/navi/components/dom.xpt +0 -0
- data/samples/navi/components/dom_base.xpt +0 -0
- data/samples/navi/components/dom_canvas.xpt +0 -0
- data/samples/navi/components/dom_core.xpt +0 -0
- data/samples/navi/components/dom_css.xpt +0 -0
- data/samples/navi/components/dom_events.xpt +0 -0
- data/samples/navi/components/dom_html.xpt +0 -0
- data/samples/navi/components/dom_loadsave.xpt +0 -0
- data/samples/navi/components/dom_range.xpt +0 -0
- data/samples/navi/components/dom_sidebar.xpt +0 -0
- data/samples/navi/components/dom_storage.xpt +0 -0
- data/samples/navi/components/dom_stylesheets.xpt +0 -0
- data/samples/navi/components/dom_svg.xpt +0 -0
- data/samples/navi/components/dom_traversal.xpt +0 -0
- data/samples/navi/components/dom_views.xpt +0 -0
- data/samples/navi/components/dom_xbl.xpt +0 -0
- data/samples/navi/components/dom_xpath.xpt +0 -0
- data/samples/navi/components/dom_xul.xpt +0 -0
- data/samples/navi/components/downloads.xpt +0 -0
- data/samples/navi/components/editor.xpt +0 -0
- data/samples/navi/components/embed_base.xpt +0 -0
- data/samples/navi/components/extensions.xpt +0 -0
- data/samples/navi/components/exthandler.xpt +0 -0
- data/samples/navi/components/fastfind.xpt +0 -0
- data/samples/navi/components/feeds.xpt +0 -0
- data/samples/navi/components/find.xpt +0 -0
- data/samples/navi/components/gfx.xpt +0 -0
- data/samples/navi/components/gksvgrenderer.xpt +0 -0
- data/samples/navi/components/history.xpt +0 -0
- data/samples/navi/components/htmlparser.xpt +0 -0
- data/samples/navi/components/imglib2.xpt +0 -0
- data/samples/navi/components/inspector.xpt +0 -0
- data/samples/navi/components/intl.xpt +0 -0
- data/samples/navi/components/intlcmpt.xpt +0 -0
- data/samples/navi/components/jar.xpt +0 -0
- data/samples/navi/components/jsconsole-clhandler.js +0 -170
- data/samples/navi/components/jsconsole.xpt +0 -0
- data/samples/navi/components/jsdservice.xpt +0 -0
- data/samples/navi/components/layout_base.xpt +0 -0
- data/samples/navi/components/layout_printing.xpt +0 -0
- data/samples/navi/components/layout_xul.xpt +0 -0
- data/samples/navi/components/layout_xul_tree.xpt +0 -0
- data/samples/navi/components/locale.xpt +0 -0
- data/samples/navi/components/lwbrk.xpt +0 -0
- data/samples/navi/components/mimetype.xpt +0 -0
- data/samples/navi/components/mozbrwsr.xpt +0 -0
- data/samples/navi/components/mozfind.xpt +0 -0
- data/samples/navi/components/necko.xpt +0 -0
- data/samples/navi/components/necko_about.xpt +0 -0
- data/samples/navi/components/necko_cache.xpt +0 -0
- data/samples/navi/components/necko_cookie.xpt +0 -0
- data/samples/navi/components/necko_data.xpt +0 -0
- data/samples/navi/components/necko_dns.xpt +0 -0
- data/samples/navi/components/necko_file.xpt +0 -0
- data/samples/navi/components/necko_ftp.xpt +0 -0
- data/samples/navi/components/necko_http.xpt +0 -0
- data/samples/navi/components/necko_res.xpt +0 -0
- data/samples/navi/components/necko_socket.xpt +0 -0
- data/samples/navi/components/necko_strconv.xpt +0 -0
- data/samples/navi/components/necko_viewsource.xpt +0 -0
- data/samples/navi/components/nsCloseAllWindows.js +0 -143
- data/samples/navi/components/nsDefaultCLH.js +0 -231
- data/samples/navi/components/nsDictionary.js +0 -148
- data/samples/navi/components/nsExtensionManager.js +0 -8497
- data/samples/navi/components/nsHelperAppDlg.js +0 -990
- data/samples/navi/components/nsInterfaceInfoToIDL.js +0 -590
- data/samples/navi/components/nsKillAll.js +0 -200
- data/samples/navi/components/nsPostUpdateWin.js +0 -711
- data/samples/navi/components/nsProgressDialog.js +0 -949
- data/samples/navi/components/nsProxyAutoConfig.js +0 -396
- data/samples/navi/components/nsResetPref.js +0 -175
- data/samples/navi/components/nsURLFormatter.js +0 -179
- data/samples/navi/components/nsUpdateService.js +0 -3074
- data/samples/navi/components/nsXULAppInstall.js +0 -301
- data/samples/navi/components/nsXmlRpcClient.js +0 -1038
- data/samples/navi/components/oji.xpt +0 -0
- data/samples/navi/components/passwordmgr.xpt +0 -0
- data/samples/navi/components/pipboot.xpt +0 -0
- data/samples/navi/components/pipnss.xpt +0 -0
- data/samples/navi/components/plugin.xpt +0 -0
- data/samples/navi/components/pref.xpt +0 -0
- data/samples/navi/components/prefetch.xpt +0 -0
- data/samples/navi/components/profile.xpt +0 -0
- data/samples/navi/components/progressDlg.xpt +0 -0
- data/samples/navi/components/proxyObject.xpt +0 -0
- data/samples/navi/components/rdf.xpt +0 -0
- data/samples/navi/components/satchel.xpt +0 -0
- data/samples/navi/components/saxparser.xpt +0 -0
- data/samples/navi/components/shistory.xpt +0 -0
- data/samples/navi/components/storage.xpt +0 -0
- data/samples/navi/components/toolkitprofile.xpt +0 -0
- data/samples/navi/components/transformiix.dll +0 -0
- data/samples/navi/components/txmgr.xpt +0 -0
- data/samples/navi/components/txtsvc.xpt +0 -0
- data/samples/navi/components/uconv.xpt +0 -0
- data/samples/navi/components/unicharutil.xpt +0 -0
- data/samples/navi/components/universalchardet.dll +0 -0
- data/samples/navi/components/update.xpt +0 -0
- data/samples/navi/components/uriloader.xpt +0 -0
- data/samples/navi/components/urlformatter.xpt +0 -0
- data/samples/navi/components/webBrowser_core.xpt +0 -0
- data/samples/navi/components/webbrowserpersist.xpt +0 -0
- data/samples/navi/components/webshell_idls.xpt +0 -0
- data/samples/navi/components/websrvcs.dll +0 -0
- data/samples/navi/components/websrvcs.xpt +0 -0
- data/samples/navi/components/widget.xpt +0 -0
- data/samples/navi/components/windowds.xpt +0 -0
- data/samples/navi/components/windowwatcher.xpt +0 -0
- data/samples/navi/components/xml-rpc.xpt +0 -0
- data/samples/navi/components/xmlextras.dll +0 -0
- data/samples/navi/components/xpcom_base.xpt +0 -0
- data/samples/navi/components/xpcom_components.xpt +0 -0
- data/samples/navi/components/xpcom_ds.xpt +0 -0
- data/samples/navi/components/xpcom_io.xpt +0 -0
- data/samples/navi/components/xpcom_obsolete.xpt +0 -0
- data/samples/navi/components/xpcom_thread.xpt +0 -0
- data/samples/navi/components/xpcom_xpti.xpt +0 -0
- data/samples/navi/components/xpconnect.xpt +0 -0
- data/samples/navi/components/xpinstall.xpt +0 -0
- data/samples/navi/components/xpti.dat +0 -1424
- data/samples/navi/components/xulapp.xpt +0 -0
- data/samples/navi/components/xulapp_setup.xpt +0 -0
- data/samples/navi/components/xuldoc.xpt +0 -0
- data/samples/navi/components/xulrunner.xpt +0 -0
- data/samples/navi/components/xultmpl.xpt +0 -0
- data/samples/navi/components/xulutil.dll +0 -0
- data/samples/navi/controlsNaviMask.png +0 -0
- data/samples/navi/greprefs/all.js +0 -1344
- data/samples/navi/greprefs/security-prefs.js +0 -69
- data/samples/navi/greprefs/xpinstall.js +0 -2
- data/samples/navi/navi_demo.rb +0 -207
- data/samples/navi/plugins/NPSWF32.dll +0 -0
- data/samples/navi/plugins/flashplayer.xpt +0 -0
- data/samples/navi/plugins/npnul32.dll +0 -0
- data/samples/navi/res/EditorOverride.css +0 -359
- data/samples/navi/res/Thumbs.db +0 -0
- data/samples/navi/res/arrow.gif +0 -0
- data/samples/navi/res/arrowd.gif +0 -0
- data/samples/navi/res/bloatcycle.html +0 -40
- data/samples/navi/res/broken-image.gif +0 -0
- data/samples/navi/res/charsetData.properties +0 -199
- data/samples/navi/res/charsetalias.properties +0 -517
- data/samples/navi/res/cmessage.txt +0 -1
- data/samples/navi/res/dtd/xhtml11.dtd +0 -300
- data/samples/navi/res/entityTables/html40Latin1.properties +0 -146
- data/samples/navi/res/entityTables/html40Special.properties +0 -69
- data/samples/navi/res/entityTables/html40Symbols.properties +0 -164
- data/samples/navi/res/entityTables/htmlEntityVersions.properties +0 -50
- data/samples/navi/res/entityTables/transliterate.properties +0 -2367
- data/samples/navi/res/fonts/fontEncoding.properties +0 -127
- data/samples/navi/res/fonts/fontNameMap.properties +0 -134
- data/samples/navi/res/forms.css +0 -531
- data/samples/navi/res/grabber.gif +0 -0
- data/samples/navi/res/hiddenWindow.html +0 -1
- data/samples/navi/res/html/Thumbs.db +0 -0
- data/samples/navi/res/html/gopher-audio.gif +0 -0
- data/samples/navi/res/html/gopher-binary.gif +0 -0
- data/samples/navi/res/html/gopher-find.gif +0 -0
- data/samples/navi/res/html/gopher-image.gif +0 -0
- data/samples/navi/res/html/gopher-menu.gif +0 -0
- data/samples/navi/res/html/gopher-movie.gif +0 -0
- data/samples/navi/res/html/gopher-sound.gif +0 -0
- data/samples/navi/res/html/gopher-telnet.gif +0 -0
- data/samples/navi/res/html/gopher-text.gif +0 -0
- data/samples/navi/res/html/gopher-unknown.gif +0 -0
- data/samples/navi/res/html.css +0 -478
- data/samples/navi/res/langGroups.properties +0 -236
- data/samples/navi/res/language.properties +0 -259
- data/samples/navi/res/loading-image.gif +0 -0
- data/samples/navi/res/quirk.css +0 -282
- data/samples/navi/res/samples/Anieyes.gif +0 -0
- data/samples/navi/res/samples/Thumbs.db +0 -0
- data/samples/navi/res/samples/aform.css +0 -69
- data/samples/navi/res/samples/beeptest.html +0 -18
- data/samples/navi/res/samples/bform.css +0 -45
- data/samples/navi/res/samples/bg.jpg +0 -0
- data/samples/navi/res/samples/cform.css +0 -40
- data/samples/navi/res/samples/checkboxTest.xul +0 -47
- data/samples/navi/res/samples/demoform.css +0 -97
- data/samples/navi/res/samples/find.html +0 -97
- data/samples/navi/res/samples/gear1.gif +0 -0
- data/samples/navi/res/samples/image_props.html +0 -58
- data/samples/navi/res/samples/mozform.css +0 -256
- data/samples/navi/res/samples/printsetup.html +0 -175
- data/samples/navi/res/samples/raptor.jpg +0 -0
- data/samples/navi/res/samples/rock_gra.gif +0 -0
- data/samples/navi/res/samples/scrollbarTest1.xul +0 -66
- data/samples/navi/res/samples/scrollbarTest2.xul +0 -19
- data/samples/navi/res/samples/sliderTest1.xul +0 -14
- data/samples/navi/res/samples/soundtest.html +0 -20
- data/samples/navi/res/samples/test.wav +0 -0
- data/samples/navi/res/samples/test0.html +0 -220
- data/samples/navi/res/samples/test1.html +0 -84
- data/samples/navi/res/samples/test10.html +0 -16
- data/samples/navi/res/samples/test11.html +0 -42
- data/samples/navi/res/samples/test12.html +0 -79
- data/samples/navi/res/samples/test13.html +0 -126
- data/samples/navi/res/samples/test14.html +0 -5
- data/samples/navi/res/samples/test15.html +0 -5
- data/samples/navi/res/samples/test16.html +0 -124
- data/samples/navi/res/samples/test2.html +0 -41
- data/samples/navi/res/samples/test3.html +0 -126
- data/samples/navi/res/samples/test4.html +0 -335
- data/samples/navi/res/samples/test5.html +0 -199
- data/samples/navi/res/samples/test6.html +0 -335
- data/samples/navi/res/samples/test7.html +0 -11
- data/samples/navi/res/samples/test8-1.html +0 -66
- data/samples/navi/res/samples/test8.html +0 -662
- data/samples/navi/res/samples/test8dom.html +0 -64
- data/samples/navi/res/samples/test8sca.html +0 -308
- data/samples/navi/res/samples/test8siz.html +0 -224
- data/samples/navi/res/samples/test8tab.html +0 -9
- data/samples/navi/res/samples/test9.html +0 -12
- data/samples/navi/res/samples/test9a.html +0 -39
- data/samples/navi/res/samples/test9b.html +0 -16
- data/samples/navi/res/samples/test_ed.html +0 -5
- data/samples/navi/res/samples/test_form.html +0 -34
- data/samples/navi/res/samples/test_gfx.html +0 -75
- data/samples/navi/res/samples/test_lbox.html +0 -100
- data/samples/navi/res/samples/test_pr.html +0 -87
- data/samples/navi/res/samples/test_weight.html +0 -45
- data/samples/navi/res/samples/toolbarTest1.xul +0 -51
- data/samples/navi/res/samples/treeTest1.css +0 -62
- data/samples/navi/res/samples/treeTest1.xul +0 -110
- data/samples/navi/res/samples/xulTest.css +0 -130
- data/samples/navi/res/svg.css +0 -64
- data/samples/navi/res/table-add-column-after-active.gif +0 -0
- data/samples/navi/res/table-add-column-after-hover.gif +0 -0
- data/samples/navi/res/table-add-column-after.gif +0 -0
- data/samples/navi/res/table-add-column-before-active.gif +0 -0
- data/samples/navi/res/table-add-column-before-hover.gif +0 -0
- data/samples/navi/res/table-add-column-before.gif +0 -0
- data/samples/navi/res/table-add-row-after-active.gif +0 -0
- data/samples/navi/res/table-add-row-after-hover.gif +0 -0
- data/samples/navi/res/table-add-row-after.gif +0 -0
- data/samples/navi/res/table-add-row-before-active.gif +0 -0
- data/samples/navi/res/table-add-row-before-hover.gif +0 -0
- data/samples/navi/res/table-add-row-before.gif +0 -0
- data/samples/navi/res/table-remove-column-active.gif +0 -0
- data/samples/navi/res/table-remove-column-hover.gif +0 -0
- data/samples/navi/res/table-remove-column.gif +0 -0
- data/samples/navi/res/table-remove-row-active.gif +0 -0
- data/samples/navi/res/table-remove-row-hover.gif +0 -0
- data/samples/navi/res/table-remove-row.gif +0 -0
- data/samples/navi/res/throbber/Thumbs.db +0 -0
- data/samples/navi/res/throbber/anim.gif +0 -0
- data/samples/navi/res/throbber/anims00.gif +0 -0
- data/samples/navi/res/throbber/anims01.gif +0 -0
- data/samples/navi/res/throbber/anims02.gif +0 -0
- data/samples/navi/res/throbber/anims03.gif +0 -0
- data/samples/navi/res/throbber/anims04.gif +0 -0
- data/samples/navi/res/throbber/anims05.gif +0 -0
- data/samples/navi/res/throbber/anims06.gif +0 -0
- data/samples/navi/res/throbber/anims07.gif +0 -0
- data/samples/navi/res/throbber/anims08.gif +0 -0
- data/samples/navi/res/throbber/anims09.gif +0 -0
- data/samples/navi/res/throbber/anims10.gif +0 -0
- data/samples/navi/res/throbber/anims11.gif +0 -0
- data/samples/navi/res/throbber/anims12.gif +0 -0
- data/samples/navi/res/throbber/anims13.gif +0 -0
- data/samples/navi/res/throbber/anims14.gif +0 -0
- data/samples/navi/res/throbber/anims15.gif +0 -0
- data/samples/navi/res/throbber/anims16.gif +0 -0
- data/samples/navi/res/throbber/anims17.gif +0 -0
- data/samples/navi/res/throbber/anims18.gif +0 -0
- data/samples/navi/res/throbber/anims19.gif +0 -0
- data/samples/navi/res/throbber/anims20.gif +0 -0
- data/samples/navi/res/throbber/anims21.gif +0 -0
- data/samples/navi/res/throbber/anims22.gif +0 -0
- data/samples/navi/res/throbber/anims23.gif +0 -0
- data/samples/navi/res/throbber/anims24.gif +0 -0
- data/samples/navi/res/throbber/anims25.gif +0 -0
- data/samples/navi/res/throbber/anims26.gif +0 -0
- data/samples/navi/res/throbber/anims27.gif +0 -0
- data/samples/navi/res/throbber/anims28.gif +0 -0
- data/samples/navi/res/throbber/anims29.gif +0 -0
- data/samples/navi/res/ua.css +0 -235
- data/samples/navi/res/viewer.properties +0 -1
- data/samples/navi/res/viewsource.css +0 -118
- data/samples/navi/res/wincharset.properties +0 -55
- data/samples/navi/resources.cfg +0 -14
- data/samples/navi/testNaviMask.png +0 -0
- data/samples/render_run_log.5796 +0 -891
data/README
CHANGED
@@ -4,7 +4,7 @@ Welcome to Ogre.rb, the Ruby wrapper around the Ogre rendering engine. This curr
|
|
4
4
|
known to build and run correctly on Linux, though I expect this will work just fine on Mac as well.
|
5
5
|
Windows support will come later.
|
6
6
|
|
7
|
-
Ogre.rb is currently built for Ruby 1.8.5+ and Ogre 1.4.
|
7
|
+
Ogre.rb is currently built for Ruby 1.8.5+ and Ogre 1.4.4 (Eihort)
|
8
8
|
|
9
9
|
== Usage
|
10
10
|
|
@@ -24,13 +24,12 @@ The samples/ directory is a direct port of the Ogre sample programs.
|
|
24
24
|
== Contributing
|
25
25
|
|
26
26
|
Please post patches, feature requests, bug fixes to the rubyforge website at http://rubyforge.org/projects/ogrerb.
|
27
|
-
|
28
|
-
part of a sample application.
|
27
|
+
All patches will be considered but those with tests, if possible, are recommended.
|
29
28
|
|
30
29
|
== Build Requirements
|
31
30
|
|
32
31
|
* rake
|
33
|
-
* Ogre 1.4.
|
32
|
+
* Ogre 1.4.4 (Eihort)
|
34
33
|
* OIS
|
35
34
|
* swig 1.3.31+ (uses -autorename)
|
36
35
|
* pkg-config (Linux)
|
@@ -45,7 +44,18 @@ The resulting files can be found in ogrerb/lib.
|
|
45
44
|
|
46
45
|
=== Mac
|
47
46
|
|
48
|
-
|
47
|
+
rake build_all
|
48
|
+
|
49
|
+
If you get an error about OIS framework not being installed, you can download a build of the OIS framework here: http://www.shatteredruby.com/support/OIS.1.0.framework.zip.* Place it into your /Library/Frameworks directory.
|
50
|
+
|
51
|
+
After building, the resulting frameworks will be located in ogrerb/lib.
|
52
|
+
|
53
|
+
You will need to run the build_mac_rubyw Rake task, which creates a rubyw executable that's fit for opening
|
54
|
+
up windows in the foreground. See http://rubyforge.org/forum/forum.php?thread_id=15371&forum_id=14174 for details.
|
55
|
+
|
56
|
+
Remember once you do this to start ogrerb programs with 'rubyw' instead of 'ruby', otherwise keyboard input will be disabled.
|
57
|
+
|
58
|
+
*The OIS framework is made by wreckedgames.com, and the sourceforge project page is here: http://sourceforge.net/projects/wgois. The build in this document is for convenience only and is not an official release.
|
49
59
|
|
50
60
|
=== Windows
|
51
61
|
|
@@ -77,3 +87,31 @@ The resulting files can be found in ogrerb/lib.
|
|
77
87
|
== Running Ogre.rb programs
|
78
88
|
|
79
89
|
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.
|
90
|
+
|
91
|
+
== Testing Ogre.rb programs
|
92
|
+
|
93
|
+
test/test_helper.rb contains the minimum needed setup for Ogre to properly allow testing of it's components.
|
94
|
+
|
95
|
+
== Notes
|
96
|
+
|
97
|
+
These are the classes currently not wrapped for various reasons:
|
98
|
+
|
99
|
+
* OgreConfigDialog
|
100
|
+
* OgreConfig
|
101
|
+
* OgreConfigOptionMap
|
102
|
+
* OgreErrorDialog
|
103
|
+
* OgreException
|
104
|
+
* OgreProfiler
|
105
|
+
* OgreStringConverter
|
106
|
+
* OgreZip
|
107
|
+
* OgreAlignedAllocator
|
108
|
+
* OgreBitwise
|
109
|
+
* OgreMemoryManager
|
110
|
+
* OgreFileSystem
|
111
|
+
* OgreUnifiedHighLevelGpuProgram
|
112
|
+
* OgreSearchOps
|
113
|
+
* OgreStableHeaders
|
114
|
+
* OgreUTFString
|
115
|
+
* OgreILCodecs
|
116
|
+
* OgreILImageCodec
|
117
|
+
* OgreILUtil
|
data/Rakefile
CHANGED
@@ -4,10 +4,17 @@ require 'rake/contrib/sshpublisher'
|
|
4
4
|
require 'rake/gempackagetask'
|
5
5
|
|
6
6
|
require 'platform'
|
7
|
+
require 'lib/rake/project_builder'
|
7
8
|
|
8
|
-
task :default => :
|
9
|
+
task :default => :test
|
9
10
|
|
10
|
-
OGRE_RB_VERSION = "0.
|
11
|
+
OGRE_RB_VERSION = "0.2"
|
12
|
+
|
13
|
+
Rake::TestTask.new do |t|
|
14
|
+
t.libs << "test"
|
15
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
16
|
+
t.verbose = true
|
17
|
+
end
|
11
18
|
|
12
19
|
###########################
|
13
20
|
# Project Managment tasks #
|
@@ -55,6 +62,7 @@ ogre_rb_spec = Gem::Specification.new do |s|
|
|
55
62
|
if Platform.windows?
|
56
63
|
lib_files = %w(lib/ogre.dll lib/ruby_ois.dll)
|
57
64
|
elsif Platform.mac?
|
65
|
+
lib_files = %w(lib/ogre.bundle lib/ruby_ois.bundle)
|
58
66
|
else # Posix environment
|
59
67
|
lib_files = %w(lib/ogre.so lib/ruby_ois.so)
|
60
68
|
end
|
@@ -74,14 +82,14 @@ ogre_rb_spec = Gem::Specification.new do |s|
|
|
74
82
|
s.required_ruby_version = '>= 1.8.4'
|
75
83
|
|
76
84
|
# Inform of the need to have Ogre installed and OGRE_HOME set
|
77
|
-
s.requirements << "Ogre Einhort (1.4)"
|
85
|
+
s.requirements << "Ogre Einhort (1.4.4)"
|
78
86
|
s.requirements << "Environment variable OGRE_HOME set"
|
79
87
|
|
80
88
|
#s.has_rdoc = false
|
81
89
|
#s.extra_rdoc_files += RDOC_INCLUDES
|
82
90
|
#s.rdoc_options += RDOC_OPTIONS
|
83
91
|
|
84
|
-
files = FileList.new %
|
92
|
+
files = FileList.new %w(
|
85
93
|
README
|
86
94
|
platform.rb
|
87
95
|
ogre.rb
|
@@ -89,7 +97,11 @@ ogre_rb_spec = Gem::Specification.new do |s|
|
|
89
97
|
lib/*.rb
|
90
98
|
samples/**/*
|
91
99
|
doc_src/**/*
|
92
|
-
|
100
|
+
test/**/*
|
101
|
+
) do |fl|
|
102
|
+
fl.exclude(/navi/)
|
103
|
+
end
|
104
|
+
|
93
105
|
files += lib_files
|
94
106
|
|
95
107
|
s.files = files
|
@@ -98,191 +110,81 @@ end
|
|
98
110
|
desc 'Package as gem & zip'
|
99
111
|
Rake::GemPackageTask.new(ogre_rb_spec) do |p|
|
100
112
|
p.gem_spec = ogre_rb_spec
|
101
|
-
#p.need_tar = true
|
102
|
-
#p.need_zip = true
|
103
113
|
end
|
104
114
|
|
105
115
|
#############################
|
106
116
|
# Project compilation tasks #
|
107
117
|
#############################
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
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
|
118
|
+
desc "Build rubyw on the mac platform, needed for ogrerb to run properly."
|
119
|
+
task :build_mac_rubyw do
|
120
|
+
if Platform.mac?
|
121
|
+
sh "ruby=`which ruby`; rubyw=${ruby}w; sudo cp $ruby $rubyw; sudo /Developer/Tools/Rez -t APPL Carbon.r -o $rubyw"
|
122
|
+
else
|
123
|
+
puts "This is only to be run on Mac OS X"
|
160
124
|
end
|
161
125
|
end
|
162
126
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
127
|
+
#############################################
|
128
|
+
# Project registration helpers documentation:
|
129
|
+
#
|
130
|
+
# project.swig_file =>
|
131
|
+
# The name of the main swig interface file (sans .i) (default: project name)
|
132
|
+
#
|
133
|
+
# project.swig_includes =>
|
134
|
+
# The include declarations needed for this project to swigify
|
135
|
+
#
|
136
|
+
# project.swig =>
|
137
|
+
# Create a block that gets called after swig is done running, for post processing
|
138
|
+
#
|
139
|
+
# project.resulting_library =>
|
140
|
+
# The final name of the built library (default: project name)
|
141
|
+
#
|
142
|
+
#
|
143
|
+
# TODO Looks like I can pull the swig block into the template, as all projects seem
|
144
|
+
# to need this STL fix
|
145
|
+
#############################################
|
146
|
+
|
147
|
+
register_project :ogre do |project|
|
148
|
+
project.swig_file = "ogre_rb"
|
149
|
+
project.swig_includes = %w(-I./src_headers/OGRE -I./src_headers/wrappers -I./src_headers/OIS)
|
150
|
+
project.swig do
|
172
151
|
if Platform.windows?
|
173
152
|
# compensate for windows stl. Uses wrong version when ruby is first.
|
174
153
|
insert_headers("build/ogre/ogre_rb_wrap.cpp") do
|
175
154
|
<<-EOF
|
176
155
|
#include "Ogre.h"
|
177
|
-
#
|
156
|
+
#include <winsock.h>
|
178
157
|
EOF
|
179
158
|
end
|
180
159
|
end
|
181
|
-
|
160
|
+
end
|
161
|
+
end
|
182
162
|
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
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)
|
163
|
+
register_project :ois do |project|
|
164
|
+
project.resulting_library = "ruby_ois"
|
165
|
+
project.swig_includes = %w(-I./src_headers/OIS -I./src_headers/wrappers)
|
166
|
+
project.swig do
|
167
|
+
if Platform.windows?
|
168
|
+
insert_headers("build/ois/ois_wrap.cpp") do
|
169
|
+
<<-EOF
|
170
|
+
#include "OIS.h"
|
171
|
+
EOF
|
172
|
+
end
|
199
173
|
end
|
200
|
-
|
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
|
174
|
+
end
|
239
175
|
end
|
240
176
|
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
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"
|
177
|
+
register_project :navi do |project|
|
178
|
+
project.swig_file = "navi_rb"
|
179
|
+
project.swig_includes = %w(-I./src_headers/navi -I./src_headers/wrappers)
|
180
|
+
project.swig do
|
251
181
|
if Platform.windows?
|
252
|
-
# compensate for windows stl. Uses wrong version when ruby is first.
|
253
|
-
|
254
182
|
insert_headers("build/navi/navi_rb_wrap.cpp") do
|
255
183
|
<<-EOF
|
256
184
|
#include "Ogre.h"
|
257
|
-
#
|
185
|
+
#include <winsock.h>
|
258
186
|
EOF
|
259
187
|
end
|
260
188
|
end
|
261
|
-
|
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
|
-
|
189
|
+
end
|
288
190
|
end
|
data/lib/application.rb
CHANGED
@@ -111,7 +111,7 @@ module Ogre
|
|
111
111
|
# Most likely won't have a joystick here, so just throw away any exceptions
|
112
112
|
@joy_stick = nil
|
113
113
|
begin
|
114
|
-
@joy_stick = @input_manager.create_input_object( OIS::OISJoyStick, buffered_joy)
|
114
|
+
@joy_stick = @input_manager.create_input_object( OIS::OISJoyStick, buffered_joy) unless Platform.mac?
|
115
115
|
rescue
|
116
116
|
end
|
117
117
|
|
@@ -177,12 +177,12 @@ module Ogre
|
|
177
177
|
|
178
178
|
# Turn Right
|
179
179
|
if @keyboard.key_down?(OIS::KC_RIGHT)
|
180
|
-
@camera.yaw(-@rot_scale)
|
180
|
+
@camera.yaw( Degree.new(-@rot_scale) )
|
181
181
|
end
|
182
182
|
|
183
183
|
# Turn Left
|
184
184
|
if @keyboard.key_down?(OIS::KC_LEFT)
|
185
|
-
@camera.yaw(@rot_scale)
|
185
|
+
@camera.yaw( Degree.new(@rot_scale) )
|
186
186
|
end
|
187
187
|
|
188
188
|
# Quit
|
@@ -279,24 +279,24 @@ module Ogre
|
|
279
279
|
protected
|
280
280
|
|
281
281
|
def update_stats
|
282
|
-
gui_avg
|
283
|
-
gui_curr
|
284
|
-
gui_best
|
285
|
-
gui_worst
|
286
|
-
gui_tris
|
287
|
-
gui_batches
|
288
|
-
gui_debug
|
282
|
+
@gui_avg ||= OverlayManager.instance.get_overlay_element("Core/AverageFps")
|
283
|
+
@gui_curr ||= OverlayManager.instance.get_overlay_element("Core/CurrFps")
|
284
|
+
@gui_best ||= OverlayManager.instance.get_overlay_element("Core/BestFps")
|
285
|
+
@gui_worst ||= OverlayManager.instance.get_overlay_element("Core/WorstFps")
|
286
|
+
@gui_tris ||= OverlayManager.instance.get_overlay_element("Core/NumTris")
|
287
|
+
@gui_batches ||= OverlayManager.instance.get_overlay_element("Core/NumBatches")
|
288
|
+
@gui_debug ||= OverlayManager.instance.get_overlay_element("Core/DebugText")
|
289
289
|
|
290
290
|
stats = @window.get_statistics
|
291
291
|
|
292
|
-
gui_curr.set_caption("Current FPS: #{"%.3f" % stats.last_fps}")
|
293
|
-
gui_avg.set_caption("Average FPS: #{"%.3f" % stats.avg_fps}")
|
294
|
-
gui_best.set_caption("Best FPS: #{"%.3f" % stats.best_fps}")
|
295
|
-
gui_worst.set_caption("Worst FPS: #{"%.3f" % stats.worst_fps}")
|
296
|
-
gui_tris.set_caption("Triangle Count: #{stats.triangle_count}")
|
297
|
-
gui_batches.set_caption("Batch Count: #{stats.batch_count}")
|
292
|
+
@gui_curr.set_caption("Current FPS: #{"%.3f" % stats.last_fps}")
|
293
|
+
@gui_avg.set_caption("Average FPS: #{"%.3f" % stats.avg_fps}")
|
294
|
+
@gui_best.set_caption("Best FPS: #{"%.3f" % stats.best_fps}")
|
295
|
+
@gui_worst.set_caption("Worst FPS: #{"%.3f" % stats.worst_fps}")
|
296
|
+
@gui_tris.set_caption("Triangle Count: #{stats.triangle_count}")
|
297
|
+
@gui_batches.set_caption("Batch Count: #{stats.batch_count}")
|
298
298
|
|
299
|
-
gui_debug.set_caption(
|
299
|
+
@gui_debug.set_caption(@debug_text)
|
300
300
|
end
|
301
301
|
end
|
302
302
|
end
|
data/lib/ogre.so
CHANGED
Binary file
|
data/lib/ruby_ois.so
CHANGED
Binary file
|
data/ogre.rb
CHANGED
@@ -6,6 +6,9 @@ $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/lib")
|
|
6
6
|
# Ruby always looks for .so first, instead of .dll if on windows.
|
7
7
|
# So, force .dll on windows environments
|
8
8
|
if Platform.windows?
|
9
|
+
require 'env'
|
10
|
+
|
11
|
+
ENV["path"]+=";"+File.dirname(__FILE__)+"/../Ogre"
|
9
12
|
require 'lib/ogre.dll'
|
10
13
|
require 'lib/ruby_ois.dll'
|
11
14
|
# require 'lib/navi.dll'
|