#!/bin/env python # Copyright (C) 2002 Gideon May (gideon@computer.org) # # Permission to copy, use, sell and distribute this software is granted # provided this copyright notice appears in all copies. # Permission to modify the code and to distribute modified code is granted # provided this copyright notice appears in all copies, and a notice # that the code was modified is included with the copyright notice. # # This software is provided "as is" without express or implied warranty, # and with no claim as to its suitability for any purpose. import sys import os import PyOSG from PyOSG import osg demos = ( ("osgversion",), # ("osgunittests", "matrix"), # ("osgunittests", "qt"), # ("osgunittests", "sizeof"), # ("osglauncher",), ("osganimate",), ("osgautotransform",), ("osgbillboard",), ("osgcallback","cow.osg"), ("osgcameragroup", "cessnafire.osg"), ("osgclip", "cow.osg"), ("osgcubemap", "cessna.osg"), ("osgdepthshadow",), ("osgdistortion", "cow.osg"), # ("osgforest",), ("osgfxbrowser", "dumptruck.osg"), ("osggeometry",), ("osghangglide",), ("osghud", "dumptruck.osg"), # ("osgimpostor",), # Fix demo ("osgkeyboard",), # ("osgkeyboardmouse",), ("osglight", "glider.osg"), ("osglightpoint",), ("osglogo",), ("osgmotionblur", "cow.osg"), ("osgmultitexture", "cessnafire.osg"), ("osgoccluder", "glider.osg"), ("osgparticle",), ("osgpick", "fountain.osg"), ("osgpointsprite",), # ("osgplanets",), ("osgprerender", "dumptruck.osg"), # ("osgprerendercubemap",), ("osgreflect", "cessna.osg"), # ("osgscalarbar",), ("osgscribe", "cow.osg"), # ("osgsequence", "cow.osg", "dumptruck.osg", "cessna.osg", "glider.osg"), # ("osgshaders",), ("osgshadowtexture", "cessna.osg"), ("osgshape",), # ("osgsimplifier", "-s", "0.1", "cessna.osg"), # ("osgsimulation",), ("osgspheresegment",), ("osgspotlight",), ("osgstereoimage", "Images/dog_left_eye.jpg", "Images/dog_right_eye.jpg"), ("osgteapot",), # ("osgtesselate",), ("osgtext",), ("osgtexture1D", "dumptruck.osg"), ("osgtexture2D",), ("osgtexture3D",), ("osgtexturerectangle",), ("osgvertexprogram",), ("osgwindows", "cow.osg"), ) def run_demo(args): print "running", " ".join(args) arg0 = os.path.join(PyOSG.__path__[0], "Demo", args[0]) cmd = '%s "%s.py" %s' % (sys.executable, arg0, " ".join(args[1:])) print "Executing ", cmd print cmd os.system(cmd) def demo_main(): for demo in demos: run_demo(demo) def runexamples(): print "PyOSG Version = ", osg.__version__ print "PyOSG Build = ", osg.__build__ demo_main() if __name__ == "__main__": demo_main()