[osg-users] I cant get DrawCallback to work...

Carlos Zoido mrgalleta at gmail.com
Fri Sep 28 02:46:30 PDT 2007


Hi all!,

I'm trying to add a DrawCallback in order to set a PostDrawCallback to
a camera and make a delay before SwapBuffers happen. At las I'm Trying
to control the frame rate of my application. I make something like
this:

class SincronizacionCallback : public osg::Camera::DrawCallback
{
public:
	
	virtual void operator()(const osg::Camera &camera);

protected:
	
};

void SincronizacionCallback::operator()(const osg::Camera &camera)
{

                SleepForSomeTime....
	return;
};


main_camera->setPostDrawCallback(new SincronizacionCallback);


I'm debugging the application and It doesnt seem to work as i never
see that the program enters in the CallBack. Could there be any bug or
anything, or maybe I'm doing something wrong ?

Thanks a lot for your help and keep doing that great work!,


Carlos.



More information about the osg-users mailing list