From Marius Heise, "here is a patch that implements Win32 HW-synced swapping using wglJoinSwapGroupNV, wglBindSwapBarrierNV and the existing traits. It was tested with multiple ATI FirePro S400 cards.

I also fixed the vsync implementation introduced with rev.11357 that was crashing with the Windows Error #170. So I removed your temporary /* */ around the vsync condition..."
This commit is contained in:
Robert Osfield
2011-04-21 13:34:03 +00:00
parent 02081af4f8
commit 634344aef5
5 changed files with 61 additions and 9 deletions

View File

@@ -145,6 +145,14 @@ class OSGVIEWER_EXPORT GraphicsWindow : public osg::GraphicsContext, public osgG
bool getSyncToVBlank() const { return _traits.valid() ? _traits->vsync : true; }
/** Set swap group. */
virtual void setSwapGroup(bool on, GLuint group, GLuint barrier)
{
osg::notify(osg::NOTICE) << "GraphicsWindow::setSwapGroup(" << on << " " << group << " " << barrier << ") not implemented." << std::endl;
}
void getSwapGroup(bool& on, GLuint& group, GLuint& barrier) const { on = _traits->swapGroupEnabled; group = _traits->swapGroup; barrier = _traits->swapBarrier; }
public:
/** Return whether a valid and usable GraphicsContext has been created.*/