restored binary compatibility

This commit is contained in:
Vladislav Vinogradov
2013-02-21 12:18:08 +04:00
parent e06c3ec7c5
commit a938534a7e
11 changed files with 1086 additions and 352 deletions

View File

@@ -125,13 +125,18 @@ CV_EXPORTS_W void setTrackbarPos(const string& trackbarname, const string& winna
// OpenGL support
typedef void (CV_CDECL *OpenGlDrawCallback)(void* userdata);
typedef void (*OpenGlDrawCallback)(void* userdata);
CV_EXPORTS void setOpenGlDrawCallback(const string& winname, OpenGlDrawCallback onOpenGlDraw, void* userdata = 0);
CV_EXPORTS void setOpenGlContext(const string& winname);
CV_EXPORTS void updateWindow(const string& winname);
// < Deperecated
CV_EXPORTS void pointCloudShow(const string& winname, const GlCamera& camera, const GlArrays& arr);
CV_EXPORTS void pointCloudShow(const string& winname, const GlCamera& camera, InputArray points, InputArray colors = noArray());
// >
//Only for Qt
CV_EXPORTS CvFont fontQt(const string& nameFont, int pointSize=-1,

View File

@@ -241,15 +241,15 @@ void cv::updateWindow(const string& windowName)
#ifdef HAVE_OPENGL
namespace
{
std::map<std::string, cv::GlTexture> wndTexs;
std::map<std::string, cv::GlTexture> ownWndTexs;
std::map<std::string, cv::GlBuffer> ownWndBufs;
std::map<std::string, cv::ogl::Texture2D> wndTexs;
std::map<std::string, cv::ogl::Texture2D> ownWndTexs;
std::map<std::string, cv::ogl::Buffer> ownWndBufs;
void CV_CDECL glDrawTextureCallback(void* userdata)
void glDrawTextureCallback(void* userdata)
{
cv::GlTexture* texObj = static_cast<cv::GlTexture*>(userdata);
cv::ogl::Texture2D* texObj = static_cast<cv::ogl::Texture2D*>(userdata);
cv::render(*texObj);
cv::ogl::render(*texObj);
}
}
#endif // HAVE_OPENGL
@@ -283,9 +283,9 @@ void cv::imshow( const string& winname, InputArray _img )
if (_img.kind() == _InputArray::OPENGL_TEXTURE)
{
cv::GlTexture& tex = wndTexs[winname];
cv::ogl::Texture2D& tex = wndTexs[winname];
tex = _img.getGlTexture();
tex = _img.getOGlTexture2D();
tex.setAutoRelease(false);
@@ -293,11 +293,11 @@ void cv::imshow( const string& winname, InputArray _img )
}
else
{
cv::GlTexture& tex = ownWndTexs[winname];
cv::ogl::Texture2D& tex = ownWndTexs[winname];
if (_img.kind() == _InputArray::GPU_MAT)
{
cv::GlBuffer& buf = ownWndBufs[winname];
cv::ogl::Buffer& buf = ownWndBufs[winname];
buf.copyFrom(_img);
buf.setAutoRelease(false);
@@ -319,6 +319,16 @@ void cv::imshow( const string& winname, InputArray _img )
#endif
}
void cv::pointCloudShow(const string&, const GlCamera&, const GlArrays&)
{
CV_Error(CV_StsNotImplemented, "This function in deprecated, do not use it");
}
void cv::pointCloudShow(const string&, const GlCamera&, InputArray, InputArray)
{
CV_Error(CV_StsNotImplemented, "This function in deprecated, do not use it");
}
// Without OpenGL
#ifndef HAVE_OPENGL