\r
#endif // HAVE_OPENGL\r
\r
-cv::GlTexture::GlTexture() : rows_(0), cols_(0), type_(0)\r
+cv::GlTexture::GlTexture() : rows_(0), cols_(0), type_(0), buf_(GlBuffer::TEXTURE_BUFFER)\r
{\r
#ifndef HAVE_OPENGL\r
throw_nogl;\r
#endif\r
}\r
\r
-cv::GlTexture::GlTexture(int rows, int cols, int type) : rows_(0), cols_(0), type_(0)\r
+cv::GlTexture::GlTexture(int rows, int cols, int type) : rows_(0), cols_(0), type_(0), buf_(GlBuffer::TEXTURE_BUFFER)\r
{\r
#ifndef HAVE_OPENGL\r
(void)rows;\r
#endif\r
}\r
\r
-cv::GlTexture::GlTexture(Size size, int type) : rows_(0), cols_(0), type_(0)\r
+cv::GlTexture::GlTexture(Size size, int type) : rows_(0), cols_(0), type_(0), buf_(GlBuffer::TEXTURE_BUFFER)\r
{\r
#ifndef HAVE_OPENGL\r
(void)size;\r
#endif\r
}\r
\r
-cv::GlTexture::GlTexture(InputArray mat_, bool bgra) : rows_(0), cols_(0), type_(0)\r
+cv::GlTexture::GlTexture(InputArray mat_, bool bgra) : rows_(0), cols_(0), type_(0), buf_(GlBuffer::TEXTURE_BUFFER)\r
{\r
#ifndef HAVE_OPENGL\r
(void)mat_;\r
throw_nocuda;\r
#else\r
GpuMat d_mat = mat_.getGpuMat();\r
- GlBuffer buf(d_mat, GlBuffer::TEXTURE_BUFFER);\r
- impl_->copyFrom(buf, bgra);\r
+ buf_.copyFrom(d_mat);\r
+ impl_->copyFrom(buf_, bgra);\r
#endif\r
\r
break;\r