Beispiel #1
0
        self.canvas = Canvas(self,-1)
    
    def close(self):
        self.Close()

#--------------------
class App(wx.App):
    def __init__(self):
        wx.App.__init__(self,0)
    def OnInit(self):
        self.frame = Frame()
        self.SetTopWindow(self.frame)
        self.frame.Show(True)
        return True
    def getFrame(self):
        return self.frame
    def getCanvas(self):
        return self.frame.canvas
    def getViewer(self):
        return self.frame.canvas.viewer

#--------------------------------------------------------------------------
if __name__ == "__main__":

    print "OSG version: ",osg.osgGetVersion()
    app = App()  
    viewer = app.getViewer()
    app.MainLoop()


Beispiel #2
0
print "--"

#python specifics
print "Python build     ", platform.python_build()
print "Python compiler  ", platform.python_compiler()

print "--"

#osg specifics
try:
    try:
        import osg
    except:
        print "import osg failed"
    print "osg.osgGetLibraryName                  ", osg.osgGetLibraryName()
    print "osg.osgGetVersion                      ", osg.osgGetVersion()
    print "osg.osgGetSOVersion                    ", osg.osgGetSOVersion()
    print "osg Python library location          : ", osg.__file__
    print "osg Dynamic linked library location  : ", osg._osg

except:
    print "Error accessing osg"
    pass

print "--"

#osgDB specifics
try:
    try:
        import osgDB
    except:
Beispiel #3
0
print "--"

#python specifics
print "Python build     ",platform.python_build()
print "Python compiler  ",platform.python_compiler()

print "--"

#osg specifics
try:
    try:
        import osg
    except:
        print "import osg failed"
    print "osg.osgGetLibraryName                  ", osg.osgGetLibraryName()
    print "osg.osgGetVersion                      ", osg.osgGetVersion()
    print "osg.osgGetSOVersion                    ", osg.osgGetSOVersion()
    print "osg Python library location          : ", osg.__file__
    print "osg Dynamic linked library location  : ", osg._osg

except:
    print "Error accessing osg"
    pass

print "--"

#osgDB specifics
try:
    try:
        import osgDB
    except:
Beispiel #4
0
	def OnAbout(self, evt):
		title = 'About'
		text = 'Python ' + sys.version + '\nwxPython ' + wx.VERSION_STRING +  '\n' + osg.osgGetLibraryName() + ' ' + osg.osgGetVersion()
		dialog = wx.MessageDialog(self, text, title, wx.OK | wx.ICON_INFORMATION)
		dialog.ShowModal()
		dialog.Destroy()