[Python-ogre-commit] SF.net SVN: python-ogre:[809] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2008-11-23 02:15:46
|
Revision: 809 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=809&view=rev Author: andy_miller Date: 2008-11-23 02:15:43 +0000 (Sun, 23 Nov 2008) Log Message: ----------- Physx update New overlay in demos Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/code_generators/physx/generate_code.py trunk/python-ogre/demos/hydrax/resources.cfg trunk/python-ogre/environment.py trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py Added Paths: ----------- trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel.material trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel.overlay trunk/python-ogre/demos/media/overlays/panel.png trunk/python-ogre/demos/media/overlays/popanel.png trunk/python-ogre/demos/media/overlays/pythonogretext.png Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-11-21 04:45:57 UTC (rev 808) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-11-23 02:15:43 UTC (rev 809) @@ -83,6 +83,7 @@ PATH_hydrax = os.path.join(PATH_THIRDPARTY, 'Hydrax') PATH_hikari = os.path.join(PATH_THIRDPARTY, 'Hikari' ) #BASE_DIR, 'hikari', 'hikari') +PATH_mygui = os.path.join(BASE_DIR, 'MyGUI_2.2.0_RC1_source' ) # it's time for the SDK version if SDK: @@ -130,8 +131,8 @@ PATH_LIB_opensteer = os.path.join(PATH_opensteer, 'win32','release') PATH_LIB_hikari = os.path.join(PATH_hikari ) # , 'lib') +PATH_LIB_mygui = os.path.join(PATH_mygui, 'MyGUIEngine','lib','Release') - PATH_INCLUDE_Ogre= os.path.join(PATH_Ogre,'OgreMain/include') PATH_INCLUDE_NEDMALLOC= os.path.join(PATH_Ogre,'OgreMain', 'src', 'nedmalloc') PATH_INCLUDE_Ogre_Dependencies = os.path.join( PATH_Ogre, 'Dependencies/include') @@ -181,6 +182,7 @@ PATH_INCLUDE_ogrepcz = os.path.join(PATH_ogrepcz,'include') PATH_INCLUDE_hydrax= PATH_hydrax PATH_INCLUDE_hikari = os.path.join(PATH_hikari ) #, 'include') +PATH_INCLUDE_mygui = os.path.join(PATH_mygui,'MyGUIEngine','include') PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include') ,os.path.join(BASE_DIR, 'vorbis', 'include') Modified: trunk/python-ogre/code_generators/physx/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/physx/generate_code.py 2008-11-21 04:45:57 UTC (rev 808) +++ trunk/python-ogre/code_generators/physx/generate_code.py 2008-11-23 02:15:43 UTC (rev 809) @@ -79,7 +79,7 @@ ] if os.name =='nt': - excludes.append('::NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::deleteEntry') + excludes.append('::NxArray<NxFluidEmitterDesc, NxAllocatorDefault>::deleteEntry') for e in excludes: print "excluding function", e @@ -93,17 +93,19 @@ print "Excluding:", e global_ns.free_functions(e).exclude() - excludes = ['NxArray<NxShapeDesc*, NxAllocatorDefault>', ## doesn't have a defult constructor for ElemType - 'NxArray<NxForceFieldShapeDesc*, NxAllocatorDefault>', ## Elemtype issue - 'NxArray<NxForceFieldShapeGroup*, NxAllocatorDefault>', ## Elemtype issue + excludes = [ + #'NxArray<NxShapeDesc*, NxAllocatorDefault>', ## doesn't have a defult constructor for ElemType + #'NxArray<NxForceFieldShapeDesc*, NxAllocatorDefault>', ## Elemtype issue + #'NxArray<NxForceFieldShapeGroup*, NxAllocatorDefault>', ## Elemtype issue 'NxForceFieldShapeGroup' ## seems to have access issues.. ] # for c in global_ns.classes(): # print c - if os.name =='nt': - excludes.append('NxArray<NxFluidEmitterDesc, NxAllocatorDefault>') ## needs ElemType changed to NxFluidEmitterDesc - else: + if os.name =='nt': + pass +# excludes.append('NxArray<NxFluidEmitterDesc, NxAllocatorDefault>') ## needs ElemType changed to NxFluidEmitterDesc + else: excludes.append ( '::NxFluidUserNotify') for e in excludes: print "Excluding Class:", e @@ -141,13 +143,24 @@ ############################################################ def ManualFixes ( mb ): - global_ns = mb.global_ns - # this change was for 1.7 but also needed for 1.4 + global_ns = mb.global_ns + # this change was for 1.7 but also needed for 1.4 noncopy=[] ###'NxPhysicsSDK'] for c in noncopy: - global_ns.class_(c).noncopyable = True + global_ns.class_(c).noncopyable = True + for c in global_ns.constructors(): + for x in range ( len ( c.arguments ) ): + if c.arguments[x].default_value: + if "ElemType" in c.arguments[x].default_value: + c.arguments[x].default_value='' + for c in global_ns.mem_funs(): + for x in range ( len ( c.arguments ) ): + if c.arguments[x].default_value: + if "ElemType" in c.arguments[x].default_value: + c.arguments[x].default_value='' + # known = ['points', 'triangles'] # for c in global_ns.classes(): # if c.name.startswith ('Nx'): Modified: trunk/python-ogre/demos/hydrax/resources.cfg =================================================================== --- trunk/python-ogre/demos/hydrax/resources.cfg 2008-11-21 04:45:57 UTC (rev 808) +++ trunk/python-ogre/demos/hydrax/resources.cfg 2008-11-23 02:15:43 UTC (rev 809) @@ -3,7 +3,7 @@ # Resource locations to be added to the default path [General] - +FileSystem=../media/overlays FileSystem=./media FileSystem=./media/materials/programs FileSystem=./media/materials/scripts Added: trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel =================================================================== --- trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel (rev 0) +++ trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel 2008-11-23 02:15:43 UTC (rev 809) @@ -0,0 +1,154 @@ +// Ogre overlay scripts +POCore/DebugOverlay +{ + zorder 500 + // Stats block + container BorderPanel(POCore/StatPanel) + { + metrics_mode pixels + vert_align bottom + left 5 + top -107 + width 220 + height 102 + material Core/StatsBlockCenter + border_size 1 1 1 1 + border_material Core/StatsBlockBorder + border_topleft_uv 0.0000 1.0000 0.0039 0.9961 + border_top_uv 0.0039 1.0000 0.9961 0.9961 + border_topright_uv 0.9961 1.0000 1.0000 0.9961 + border_left_uv 0.0000 0.9961 0.0039 0.0039 + border_right_uv 0.9961 0.9961 1.0000 0.0039 + border_bottomleft_uv 0.0000 0.0039 0.0039 0.0000 + border_bottom_uv 0.0039 0.0039 0.9961 0.0000 + border_bottomright_uv 0.9961 0.0039 1.0000 0.0000 + + container Panel(POCore/BreakPanel) + { + metrics_mode pixels + left 5 + top 22 + width 210 + height 1 + material Core/StatsBreak + } + + element TextArea(POCore/CurrFps) + { + metrics_mode pixels + left 5 + top 5 + width 90 + height 30 + font_name BlueHighway + char_height 19 + caption Current FPS: + colour_top 1 1 0.7 + colour_bottom 1 1 0.7 + } + element TextArea(POCore/AverageFps) + { + metrics_mode pixels + left 5 + top 25 + width 90 + height 30 + font_name BlueHighway + char_height 16 + caption AVERAGE FPS: + colour_top 0.5 0.7 0.5 + colour_bottom 0.3 0.5 0.3 + } + element TextArea(POCore/WorstFps) + { + metrics_mode pixels + left 5 + top 40 + width 90 + height 30 + font_name BlueHighway + char_height 16 + caption WORST FPS: + colour_top 0.5 0.7 0.5 + colour_bottom 0.3 0.5 0.3 + } + element TextArea(POCore/BestFps) + { + metrics_mode pixels + left 5 + top 55 + width 90 + height 30 + font_name BlueHighway + char_height 16 + caption BEST FPS: + colour_top 0.5 0.7 0.5 + colour_bottom 0.3 0.5 0.3 + } + element TextArea(POCore/NumTris) + { + metrics_mode pixels + left 5 + top 70 + width 90 + height 30 + font_name BlueHighway + char_height 16 + caption Triangle Count: + colour_top 0.5 0.7 0.5 + colour_bottom 0.3 0.5 0.3 + } + element TextArea(POCore/NumBatches) + { + metrics_mode pixels + left 5 + top 85 + width 90 + height 30 + font_name BlueHighway + char_height 16 + caption Batch Count: + colour_top 0.5 0.7 0.5 + colour_bottom 0.3 0.5 0.3 + } + element TextArea(POCore/DebugText) + { + metrics_mode pixels + left 230 + top 70 + width 200 + height 30 + font_name BlueHighway + char_height 16 + colour_top 0.5 0.7 0.5 + colour_bottom 0.3 0.5 0.3 + } + + } + container Panel(POCore/LogoPanel) + { + metrics_mode pixels + horz_align right + vert_align bottom + top -75 + left -165 + width 150 + height 75 + material Core/OgreText + } +} + +// A silly example of how you would do a 3D cockpit +//Examples/KnotCockpit +//{ +// zorder 100 +// entity knot.mesh(hudKnot) +// { +// position 0 0 -50 +// rotation 0 0 0 0 +// } +// +//} + + + Added: trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel.material =================================================================== --- trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel.material (rev 0) +++ trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel.material 2008-11-23 02:15:43 UTC (rev 809) @@ -0,0 +1,52 @@ +material POCore/StatsBlockCenter +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_check off + + texture_unit + { +// texture New_Ogre_Border_Center.png + texture popanel.png + } + } + } +} +material POCore/OgreText +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_check off + + texture_unit + { + texture pythonogretext.png + } + } + } +} +material POCore/Panel +{ + technique + { + pass + { + lighting off + scene_blend alpha_blend + depth_check off + + texture_unit + { + texture popanel.png + } + } + } +} \ No newline at end of file Added: trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel.overlay =================================================================== --- trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel.overlay (rev 0) +++ trunk/python-ogre/demos/media/overlays/PythonOgreDebugPanel.overlay 2008-11-23 02:15:43 UTC (rev 809) @@ -0,0 +1,119 @@ +// Ogre overlay scripts +POCore/DebugOverlay +{ + zorder 500 + // Stats block + container BorderPanel(POCore/StatPanel1) + { + metrics_mode pixels + vert_align bottom + left 3 + top -92 + width 637 + height 90 + material POCore/StatsBlockCenter + + + element TextArea(POCore/CurrFps) + { + metrics_mode pixels + left 500 + top 15 + width 140 + height 20 + font_name BlueHighway + char_height 16 + caption FPS: + colour_top 0.4 0.4 0.2 + //1 1 0.7 + colour_bottom 0 0 0.0 + //1 1 0.7 + } + element TextArea(POCore/AverageFps) + { + metrics_mode pixels + left 500 + top 30 + width 90 + height 20 + font_name BlueHighway + char_height 16 + caption AVG FPS: + colour_top 0.4 0.4 0.2 + //0.5 0.7 0.5 + colour_bottom 0 0 0.0 + //0.3 0.5 0.3 + } + element TextArea(POCore/NumTris) + { + metrics_mode pixels + left 500 + top 45 + width 90 + height 20 + font_name BlueHighway + char_height 16 + caption Triangles: + colour_top 0.4 0.4 0.2 + //0.5 0.7 0.5 + colour_bottom 0 0 0.0 + //0.3 0.5 0.3 + } + element TextArea(POCore/NumBatches) + { + metrics_mode pixels + left 500 + top 60 + width 90 + height 20 + font_name BlueHighway + char_height 16 + caption Batches: + colour_top 0.4 0.4 0.2 + //0.5 0.7 0.5 + colour_bottom 0 0 0.0 + //0.3 0.5 0.3 + } + element TextArea(POCore/DebugText) + { + metrics_mode pixels + left 105 + top 73 + width 400 + height 30 + font_name BlueHighway + char_height 14 + colour_top 1 1 0.7 + // 0.5 0.7 0.5 + colour_bottom 1 1 0.7 + //0.3 0.5 0.3 + } + + } +// container Panel(POCore/LogoPanel) +// { +// metrics_mode pixels +// horz_align right +// vert_align bottom +// top -95 +// left -165 +// width 160 +// height 93 +// material POCore/OgreText +// } +//} + +// A silly example of how you would do a 3D cockpit +//Examples/KnotCockpit +//{ +// zorder 100 +// entity knot.mesh(hudKnot) +// { +// position 0 0 -50 +// rotation 0 0 0 0 +// } +// +//} + + + Added: trunk/python-ogre/demos/media/overlays/panel.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/media/overlays/panel.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/media/overlays/popanel.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/media/overlays/popanel.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/python-ogre/demos/media/overlays/pythonogretext.png =================================================================== (Binary files differ) Property changes on: trunk/python-ogre/demos/media/overlays/pythonogretext.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/python-ogre/environment.py =================================================================== --- trunk/python-ogre/environment.py 2008-11-21 04:45:57 UTC (rev 808) +++ trunk/python-ogre/environment.py 2008-11-23 02:15:43 UTC (rev 809) @@ -44,10 +44,10 @@ ## ## set this to True if you compiled Ogre with Threads enabled ## -if isWindows(): - _USE_THREADS = True -else: - _USE_THREADS = False +if isWindows(): + _USE_THREADS = True +else: + _USE_THREADS = False PythonOgreMajorVersion = "1" @@ -643,7 +643,7 @@ base = "ogre-v1-6-0" buildCmds = [ [0, tar + " jxf " + os.path.join(downloadPath,base)+".tar.bz2 --overwrite",os.getcwd() ], - [0, "patch -s -N -i ./python-ogre/patch/ogre_1.6.0.patch -p0 ", os.getcwd()], + [0, "patch -s -N -i ./python-ogre/patch/ogre_1.6.0.patch -p0 ", os.getcwd()], [0, "sed --in-place -s 's|#define OGRE_THREAD_SUPPORT 1|#define OGRE_THREAD_SUPPORT 0|' OgreConfig.h",os.path.join(os.getcwd(),"ogre","OgreMain", "include")], [0, "aclocal", os.path.join(os.getcwd(), 'ogre')], [0, "./bootstrap", os.path.join(os.getcwd(), 'ogre')], @@ -655,7 +655,7 @@ libs.append ( boost_python_index.lib ) lib_dirs=[Config.LOCAL_LIB] include_dirs=[Config.PATH_Boost, Config.PATH_INCLUDE_Ogre] - CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19 -D__PYTHONOGRE_BUILD_CODE ' + CCFLAGS = ' -DBOOST_PYTHON_MAX_ARITY=19 -D__PYTHONOGRE_BUILD_CODE ' source = [ [wget, "http://downloads.sourceforge.net/ogre/"+base+".tar.bz2",downloadPath], @@ -1811,6 +1811,29 @@ ModuleName="hikari" descText = "Use Flash controls within Ogre" descLink = "http://hikari-library.googlecode.com/" + +class mygui: + active = True + pythonModule = True + version="2.2.0RC1" + name='mygui' + parent="ogre/gui" + cflags = "" + include_dirs = [ Config.PATH_Boost, + Config.PATH_INCLUDE_mygui + , Config.PATH_INCLUDE_Ogre + ,Config.PATH_INCLUDE_Ogre_Dependencies + ] + lib_dirs = [Config.PATH_LIB_Boost + ,Config.PATH_LIB_Ogre_OgreMain + ,Config.PATH_LIB_mygui + + ] + CheckIncludes=[] + libs=[ boost.lib, 'OgreMain', 'MyGUI' ] ##, 'hikari' ] + ModuleName="mygui" + descText = "MyGUI Interface System" + descLink = "http://sourceforge.net/projects/my-gui/" ############################################################################################ @@ -1853,6 +1876,7 @@ , 'ogrepcz' : ogrepcz , 'hydrax' : hydrax , 'hikari' : hikari + , 'mygui' : mygui } # Modified: trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py =================================================================== --- trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-11-21 04:45:57 UTC (rev 808) +++ trunk/python-ogre/packages_2.5/ogre/renderer/OGRE/sf_OIS.py 2008-11-23 02:15:43 UTC (rev 809) @@ -443,9 +443,9 @@ def showDebugOverlay(self, show): """Turns the debug overlay (frame statistics) on or off.""" - overlay = ogre.OverlayManager.getSingleton().getByName('Core/DebugOverlay') + overlay = ogre.OverlayManager.getSingleton().getByName('POCore/DebugOverlay') if overlay is None: - raise ogre.Exception(111, "Could not find overlay Core/DebugOverlay", "SampleFramework.py") + raise ogre.Exception(111, "Could not find overlay POCore/DebugOverlay", "SampleFramework.py") if show: overlay.show() else: @@ -566,14 +566,16 @@ def _updateStatistics(self): statistics = self.renderWindow - self._setGuiCaption('Core/AverageFps', 'Average FPS: %f' % statistics.getAverageFPS()) - self._setGuiCaption('Core/CurrFps', 'Current FPS: %f' % statistics.getLastFPS()) - self._setGuiCaption('Core/BestFps', - 'Best FPS: %f %d ms' % (statistics.getBestFPS(), statistics.getBestFrameTime())) - self._setGuiCaption('Core/WorstFps', - 'Worst FPS: %f %d ms' % (statistics.getWorstFPS(), statistics.getWorstFrameTime())) - self._setGuiCaption('Core/NumTris', 'Triangle Count: %d' % statistics.getTriangleCount()) - self._setGuiCaption('Core/DebugText', Application.debugText) + self._setGuiCaption('POCore/AverageFps', 'Avg FPS: %u' % statistics.getAverageFPS()) + self._setGuiCaption('POCore/CurrFps', 'FPS: %u' % statistics.getLastFPS()) +# self._setGuiCaption('POCore/BestFps', +# 'Best FPS: %f %d ms' % (statistics.getBestFPS(), statistics.getBestFrameTime())) +# self._setGuiCaption('POCore/WorstFps', +# 'Worst FPS: %f %d ms' % (statistics.getWorstFPS(), statistics.getWorstFrameTime())) + self._setGuiCaption('POCore/NumTris', 'Trianges: %u' % statistics.getTriangleCount()) + self._setGuiCaption('POCore/NumBatches', 'Batches: %u' % statistics.batchCount) + + self._setGuiCaption('POCore/DebugText', Application.debugText) def _setGuiCaption(self, elementName, text): element = ogre.OverlayManager.getSingleton().getOverlayElement(elementName, False) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |