restored original behaviour or release functions for (Buffer and Texture)
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Mon, 9 Sep 2013 06:57:45 +0000 (10:57 +0400)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Mon, 9 Sep 2013 06:57:45 +0000 (10:57 +0400)
modules/core/doc/opengl_interop.rst
modules/core/src/opengl.cpp

index 53c58fc..5267c4d 100644 (file)
@@ -122,6 +122,8 @@ Decrements the reference counter and destroys the buffer object if needed.
 
 .. ocv:function:: void ogl::Buffer::release()
 
+The function will call `setAutoRelease(true)` .
+
 
 
 ogl::Buffer::setAutoRelease
@@ -323,6 +325,8 @@ Decrements the reference counter and destroys the texture object if needed.
 
 .. ocv:function:: void ogl::Texture2D::release()
 
+The function will call `setAutoRelease(true)` .
+
 
 
 ogl::Texture2D::setAutoRelease
index 7bff69b..36a437a 100644 (file)
@@ -563,6 +563,8 @@ void cv::ogl::Buffer::create(int arows, int acols, int atype, Target target, boo
 void cv::ogl::Buffer::release()
 {
 #ifdef HAVE_OPENGL
+    if (impl_)
+        impl_->setAutoRelease(true);
     impl_ = Impl::empty();
     rows_ = 0;
     cols_ = 0;
@@ -1081,6 +1083,8 @@ void cv::ogl::Texture2D::create(int arows, int acols, Format aformat, bool autoR
 void cv::ogl::Texture2D::release()
 {
 #ifdef HAVE_OPENGL
+    if (impl_)
+        impl_->setAutoRelease(true);
     impl_ = Impl::empty();
     rows_ = 0;
     cols_ = 0;