From Ulrich Hertlien with little bits from Robert Osfield and Chris Hanson, added provisionl support for controlling sync to vblank.

This commit is contained in:
Robert Osfield
2010-04-21 17:16:13 +00:00
parent 6e03d73efe
commit 9eebb2eb23
8 changed files with 160 additions and 91 deletions

View File

@@ -134,6 +134,14 @@ class OSGVIEWER_EXPORT GraphicsWindow : public osg::GraphicsContext, public osgG
/** Create a new mouse cursor from the usual bitmap data.*/
//virtual MouseCursor createCursor(const char *data, const char *mask, unsigned w, unsigned h, unsigned hotx, unsigned hoty) { osg::notify(osg::NOTICE)<<"GraphicsWindow::createCursor(..) not implemented."<<std::endl; }
/** Set sync-to-vblank. */
virtual void setSyncToVBlank(bool on)
{
osg::notify(osg::NOTICE) << "GraphicsWindow::setSyncToVBlank(" << on << ") not implemented." << std::endl;
}
bool getSyncToVBlank() const { return _traits.valid() ? _traits->vsync : true; }
public:
/** Return whether a valid and usable GraphicsContext has been created.*/