example code of loading osg into an application