[Python-ogre-commit] SF.net SVN: python-ogre: [611] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2008-06-24 05:36:51
|
Revision: 611
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=611&view=rev
Author: andy_miller
Date: 2008-06-23 22:37:00 -0700 (Mon, 23 Jun 2008)
Log Message:
-----------
Further Demo fixes - Theora working
Modified Paths:
--------------
trunk/python-ogre/demos/dshow/Demo_Video.py
trunk/python-ogre/demos/theora/demo_video.py
trunk/python-ogre/scripts/UpdateDLLs.bat
Modified: trunk/python-ogre/demos/dshow/Demo_Video.py
===================================================================
--- trunk/python-ogre/demos/dshow/Demo_Video.py 2008-06-23 12:29:15 UTC (rev 610)
+++ trunk/python-ogre/demos/dshow/Demo_Video.py 2008-06-24 05:37:00 UTC (rev 611)
@@ -23,6 +23,7 @@
camera = self.camera
sceneManager.ambientLight = ogre.ColourValue(0.5, 0.5, 0.5)
+ sceneManager.setSkyDome (True, 'Examples/CloudySky',4.0,8.0)
light = sceneManager.createLight('MainLight')
light.setPosition (20, 80, 150)
@@ -31,17 +32,8 @@
movieName = "../media_extra/fish.avi"
self.dshowMovieTextureSystem.loadMovie(movieName)
- self.dshowMovieTextureSystem.playMovie()
-
- skyMaterial = ogre.MaterialManager.getSingleton() #get the material manager pointer
- skyMaterial = skyMaterial.create('SkyMat', ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME )
- skyMaterial.lightingEnabled = False
-
- textureUnitState = skyMaterial.getTechnique(0).getPass(0).createTextureUnitState('clouds.jpg', 0)
- textureUnitState.setScrollAnimation(0.15, 0)
-
- sceneManager.setSkyDome(True, 'SkyMat', -5.0, 2.0)
-
+# self.dshowMovieTextureSystem.playMovie()
+
c = sceneManager.createEntity("cubo", "cube.mesh")
n = sceneManager.getRootSceneNode().createChildSceneNode()
n.attachObject(c)
@@ -51,6 +43,8 @@
c.setMaterialName('Examples/Rockwall')
mat=ogre.MaterialManager.getSingleton().getByName('Examples/Rockwall')
+ mat.getTechnique(0).getPass(0).createTextureUnitState()
+
tex=mat.getTechnique(0).getPass(0).getTextureUnitState(0)
tex.setTextureName(
self.dshowMovieTextureSystem.getMovieTexture().getName())
Modified: trunk/python-ogre/demos/theora/demo_video.py
===================================================================
--- trunk/python-ogre/demos/theora/demo_video.py 2008-06-23 12:29:15 UTC (rev 610)
+++ trunk/python-ogre/demos/theora/demo_video.py 2008-06-24 05:37:00 UTC (rev 611)
@@ -38,22 +38,15 @@
self.Control = theora.TheoraVideoController() ##InitVideoController() getVideoController() ##
- print "\n\n", dir(self.Control)
-
if not self.Control:
print "\n\nClip not found\n"
sys.exit()
self.Control.setInputName( '../media_extra/fish.ogg' )
- print dir (theora)
- self.Control.setPlayMode(theora.TextureEffectPause );
+ self.Control.setPlayMode(theora.TextureEffectPause )
self.Control.setTextureTecPassStateLevel( 0, 0, 0 )
self.Control.setSeekEnabled( False )
- ##This is mainly for OpenAL - but applies to other audio libs which
- ##use pooling instead of callbacks for updating...
- ##Let TheoraMovieClip update the audioclip.
- ##self.Control.setAutoAudioUpdate( False )
mat = ogre.MaterialManager.getSingleton().getByName("Example/TheoraVideoPlayer/Play")
#Create the material the first time through this method
@@ -62,7 +55,6 @@
mat.getTechnique(0).getPass(0).createTextureUnitState()
self.Control.createDefinedTexture( "Example/TheoraVideoPlayer/Play", "General" )
- print "****************\n", dir (self.Control)
# # dmanager = ogre.DynLibManager.getSingletonPtr()
# # oalsound = dmanager.load ("OAL_MOD")
@@ -71,31 +63,18 @@
# # print "SYM:", OALManager
# # OALManager.start()
- slib = ctypes.cdll.LoadLibrary("OAL_MOD")
- print slib
- print dir(slib)
- f = slib.getSoundSystem()
- print f
- print dir(f)
- f.start()
-
-
+# slib = ctypes.cdll.LoadLibrary("OAL_MOD")
+# print slib
+# print dir(slib)
+# f = slib.getSoundSystem()
+# print f
+# print dir(f)
+# f.start()
-
self.Clip = self.Control.getMaterialNameClip("Example/TheoraVideoPlayer/Play")
-# self.ad = theora.TheoraAudioDriver()
-# self.Clip.setAudioDriver( self.ad )
self.playmode = theora.TextureEffectPlay_ASAP
self.Clip.changePlayMode ( self.playmode )
-
-
- skyMaterial = ogre.MaterialManager.getSingleton() #get the material manager pointer
- skyMaterial = skyMaterial.create('SkyMat', ogre.ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME )
- skyMaterial.lightingEnabled = False
- textureUnitState = skyMaterial.getTechnique(0).getPass(0).createTextureUnitState('clouds.jpg', 0)
- textureUnitState.setScrollAnimation(0.15, 0)
- sceneManager.setSkyDome(True, 'SkyMat', -5.0, 2.0)
c = sceneManager.createEntity("cubo", "cube.mesh")
n = sceneManager.getRootSceneNode().createChildSceneNode()
Modified: trunk/python-ogre/scripts/UpdateDLLs.bat
===================================================================
--- trunk/python-ogre/scripts/UpdateDLLs.bat 2008-06-23 12:29:15 UTC (rev 610)
+++ trunk/python-ogre/scripts/UpdateDLLs.bat 2008-06-24 05:37:00 UTC (rev 611)
@@ -55,8 +55,8 @@
copy /y %physx%\Ph*.dll %package%\physics\PhysX
copy /y %physx%\Nx*.dll %package%\physics\NxOgre_09
rem Theora
-copy /y %theora%\Plugin_TheoraVideoSystem.dll ..\plugin
-copy /y %theora%\Plugin_TheoraVideoSystem.dll %package%\addons\theora
+copy /y %theora%\Plugin_TheoraVideoSystem.dll ..\plugins
+REM copy /y %theora%\Plugin_TheoraVideoSystem.dll %package%\addons\theora
rem FFMpeg
copy /y %ffmpeg%\lib\*.dll %package%\addons\ogrevideoffmpeg
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|