mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
highgui: expose VSYNC window property for OpenGL on W32
property getter/setter code conditional on HAVE_OPENGL getter: return -1 upon specific OpenGL errors
This commit is contained in:
@@ -92,6 +92,14 @@ CV_IMPL void cvSetWindowProperty(const char* name, int prop_id, double prop_valu
|
||||
#endif
|
||||
break;
|
||||
|
||||
case cv::WND_PROP_VSYNC:
|
||||
#if defined (HAVE_WIN32UI)
|
||||
cvSetPropVsync_W32(name, (prop_value != 0));
|
||||
#else
|
||||
// not implemented yet for other toolkits
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:;
|
||||
}
|
||||
}
|
||||
@@ -182,6 +190,14 @@ CV_IMPL double cvGetWindowProperty(const char* name, int prop_id)
|
||||
#endif
|
||||
break;
|
||||
|
||||
case cv::WND_PROP_VSYNC:
|
||||
#if defined (HAVE_WIN32UI)
|
||||
return cvGetPropVsync_W32(name);
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user