from PyOSG import Producer from PyOSG import osg from PyOSG import osgGA from PyOSG import osgDB from PyOSG import osgProducer from OpenGL.GL import * s_imageStream = None #class PostSwapFinishCallback( Producer.Camera.Callback): # def __init__(self): # Producer.Camera.Callback.__init__(self) # # def apply(self, camera): # global s_imageStream # # osg.Timer_t start_tick = osg.Timer.instance().tick() # # osgProducer.OsgSceneHandler* sh = const_cast(dynamic_cast(camera.getSceneHandler())) # # if s_imageStream and s_imageStream.getPixelBufferObject(): # s_imageStream.getPixelBufferObject().compileBuffer(*(sh.getSceneView().getState())) # # glFinish() # #osg.notify(osg.NOTICE)<<"callback after PBO "<